CSS Triangle Generator
Generate CSS triangles using the border trick.
width: 0; height: 0; border-left: 40px solid transparent; border-right: 40px solid transparent; border-bottom: 60px solid #6366f1;
Create a pure-CSS triangle in any direction, size and color, and copy the border code.
How to use
- Choose a direction and size.
- Pick a color.
- Copy the CSS.
Frequently asked questions
- How does it work?
- It uses transparent borders on a zero-size element, coloring only one side.
- Can I use it for arrows?
- Yes, CSS triangles are common for tooltips and dropdown arrows.