-2

How to create the traiangle using only HTML and CSS?

I need to create the thick triangle using only CSS

I already tried this code:

.arrow-up {
  width: 0; 
  height: 0; 
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;

  border-bottom: 5px solid black;
}
<span class="arrow-up"></span>
Louis 'LYRO' Dupont
  • 869
  • 2
  • 14
  • 30
M K
  • 1,361
  • 2
  • 8
  • 20

3 Answers3

3

You can try this for Up arrow. More click Here

  .arrow-up {
    width: 0; 
    height: 0; 
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;

    border-bottom: 15px solid blue;
  }
<div class="arrow-up"></div>
    
  
Pravin Vavadiya
  • 3,099
  • 1
  • 15
  • 33
2

You can create it using border. check snippet below..

.arrow-up {
  width: 0; 
  height: 0; 
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-bottom: 15px solid black;
}
<div class="arrow-up"></div>
Super User
  • 9,078
  • 3
  • 27
  • 46
2

Use this code

.up-aerow {
    border-color: transparent transparent #000;
    border-style: solid;
    border-width: 10px;
    height: 0px;
    width: 0px;
}
<div class="up-aerow"></div>
ankita patel
  • 4,131
  • 1
  • 12
  • 28