QuickFreeTools

Online CSS Triangle Generator

Generate CSS for a triangle shape using borders. Pick direction and color.

.triangle {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 30px 60px 30px;
  border-color: transparent transparent #374151 transparent;
}

Frequently Asked Questions

How does the triangle work?
A zero-size box with thick borders shows only the edge of one side, forming a triangle.
What directions can I choose?
Up, down, left, or right. The triangle points in that direction.

Related Developer Tools