CSS Triangle Generator
Generate CSS triangles with the border trick.
Direction
Size50px
Color
CSS
.triangle {
width: 0;
height: 0;
border-left: 50px solid transparent;
border-right: 50px solid transparent;
border-bottom: 50px solid #00f2fe;
}The CSS border triangle trick
A zero-width, zero-height element shows only its borders, and each border meets its neighbors on a diagonal. By making three borders transparent and giving the fourth a color, you get a crisp, scalable triangle with no images or SVG. The pointing direction is set by which border carries the color. Copy the generated CSS straight into tooltips, dropdown arrows, and carets.
Related Design & CSS tools
Color Converter
Convert a color to HEX, RGB, HSL, HSB, and CMYK at once.
HEX to RGB
Convert HEX color codes to RGB / RGBA values.
RGB to HEX
Convert RGB values into HEX color codes.
CSS Box Shadow Generator
Visually design CSS box-shadow with a live preview and code.
CSS Border Radius Generator
Visually craft border-radius with a live preview.
HEX to CMYK
Convert HEX colors to CMYK print values.
CMYK to HEX
Convert CMYK print values to HEX colors.
HEX to HSB
Convert HEX colors to HSB / HSV values.