Toolzy

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

  1. Choose a direction and size.
  2. Pick a color.
  3. 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.

Related tools