Triangle settings
The border trick draws triangles with zero images.
Preview and CSS
Generate CSS triangles pointing any direction with the classic border trick. Set size and color, preview live, then copy the CSS.
The border trick draws triangles with zero images.
When an element has zero width and height, its four borders meet as diagonal wedges. Coloring one border and making the rest transparent leaves a single triangle. The colored border sits opposite the direction the triangle points: border-bottom draws an up triangle.
For a balanced look the height should be about 87 percent of the base width, which is the ratio of an equilateral triangle. This tool applies that ratio automatically so your triangles never look squat or stretched.