-1

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
  • 1,052
  • 4
  • 15
  • 35
M K
  • 1,821
  • 4
  • 11
  • 22

3 Answers3

4

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,195
  • 1
  • 17
  • 34
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,448
  • 3
  • 31
  • 47
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,201
  • 1
  • 13
  • 28