.triangle{
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-bottom: 5px solid red;
border-width:100px;
}
#triangle {
width: 0;
height: 0;
border-left: 18px solid transparent;
border-right: 18px solid transparent;
border-bottom: 30px solid blue;
}
#triangle-up {
width: 0;
height: 0;
border-left: 50px solid transparent;
border-right: 50px solid transparent;
border-bottom: 100px solid red;
}
<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;
}
/*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;
}
Code Example |
---|
Css :: removing space between words css |
Css :: css table th width |
Css :: tailwind css installation |
Css :: css border-left |
Css :: import font css from url |
Css :: how to give opacity to border |
Css :: cursor not pointer |
Css :: link active css |
Css :: blur background css |
Css :: vh and vw |
Css :: *+* css |
Css :: css blur image without blur borders |
Css :: show icon on hover css |
Css :: checkbox change background color bootstrap |
Css :: how to desactivate txt selection css |
Css :: after icon css |
Css :: css font-variant |
Css :: transition |
Css :: link text underline css none |
Css :: css make text closer together |
Css :: font shorthand css |
Css :: css pointer-events |
Css :: css how to make text italic |
Css :: sass table |
Css :: align centre |
Css :: css disabled hover none |
Css :: php executable not found. install php 7 and add it to your path |
Css :: css stroke |
Css :: image cover css |
Css :: button css normal |