Search
 
SCRIPT & CODE EXAMPLE
 

CSS

how to make a triangle in css

.triangle{
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 5px solid red;
  border-width:100px;
}
Comment

triangle css

#triangle {
    width: 0;
    height: 0;
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-bottom: 30px solid blue;
}
Comment

css triangle

#triangle-up {
  width: 0;
  height: 0;
  border-left: 50px solid transparent;
  border-right: 50px solid transparent;
  border-bottom: 100px solid red;
}
Comment

css triangle

<div class="arrow-up"></div>
<div class="arrow-down"></div>
<div class="arrow-left"></div>
<div class="arrow-right"></div>

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

.arrow-down {
  width: 0; 
  height: 0; 
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  
  border-top: 20px solid #f00;
}

.arrow-right {
  width: 0; 
  height: 0; 
  border-top: 60px solid transparent;
  border-bottom: 60px solid transparent;
  
  border-left: 60px solid green;
}

.arrow-left {
  width: 0; 
  height: 0; 
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent; 
  
  border-right:10px solid blue; 
}
Comment

triangle css

/*corner triangles if you want normal triangles look at other answers*/
    #triangle-topleft {
      width: 0;
      height: 0;
      border-top: 100px solid red;
      border-right: 100px solid transparent;
    }
    #triangle-topright {
      width: 0;
      height: 0;
      border-top: 100px solid red;
      border-left: 100px solid transparent;
    }
    #triangle-bottomleft {
      width: 0;
      height: 0;
      border-bottom: 100px solid red;
      border-right: 100px solid transparent;
    }

    #triangle-topright {
      width: 0;
      height: 0;
      border-top: 100px solid red;
      border-left: 100px solid transparent;
    }
  
Comment

PREVIOUS NEXT
Code Example
Css :: griddy css 
Css :: css image size adjust 
Css :: css align bottom of container 
Css :: bootstrap 5 sidebar class 
Css :: css change text size 
Css :: color code green 
Css :: call circle icon in html css 
Css :: how to add a linear gradient in css 
Css :: css border only top and bottom 
Css :: space between text css 
Css :: css make background visible in text 
Css :: how to make image fit container css 
Css :: css how to change font colr 
Css :: how to underline font in css 
Css :: css selector attribute contain 
Css :: background image 
Css :: css resize image 
Css :: css set background color 
Css :: rotate in 3d css 
Css :: css no purple links 
Css :: background pulled to corner on small screens 
Css :: css remove second element 
Css :: css delay between animation iterations 
Css :: css curved border 
Css :: @fontface otf 
Css :: css scrollbar width 
Css :: padding css 
Css :: css font variant small caps 
Css :: css example 
Css :: how to add dotted line after and before text in css 
ADD CONTENT
Topic
Content
Source link
Name
2+8 =