4 ms·
Note: You only need to specify 3 borders. Eg. a triangle pointing down: .triangle-down { border-left: 7px solid transparent; border-right: 7px solid
by babby 13y ago
Note: You only need to specify 3 borders.
Eg. a triangle pointing down:
.triangle-down {
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-top: 7px solid #444;
}
- deleted 13y ago[deleted]
- ender7 13y agowidth and height are automatically 0 if the element is inline (i.e. a span) or absolutely positionrf (which is usually true for these kinds of triangles)
- user-id 13y agoA little more concise: .triangle-down { border: 1em solid transparent; border-top-color: #444; }