Skip to content

CSS Triangle Generator

Embed

Paste this where you want CSS Triangle Generator on your site. Adjust the height to fit.

<iframe src="https://www.browserutils.dev/embed/css-triangle-generator/" width="100%" height="500" frameborder="0" loading="lazy" title="CSS Triangle Generator"></iframe>
<p style="font-size:12px;margin:4px 0 0"><a href="https://www.browserutils.dev/tools/css-triangle-generator/">CSS Triangle Generator</a> by BrowserUtils</p>

Generate CSS triangles using borders.Runs in this tab.

.triangle {
  width: 0;
  height: 0;
  border-left: 60px solid transparent;
  border-right: 60px solid transparent;
  border-bottom: 60px solid #06b6d4;
}

Next step

About CSS Triangle Generator

Free online CSS triangle generator. Create triangles pointing in any direction using the CSS border technique with live preview. It runs in your browser. Nothing is sent to a server.

Questions

How does the CSS triangle technique work?
CSS triangles are created by setting an element to zero width and height, then using transparent borders on three sides and a colored border on the fourth side.
What directions are supported?
You can generate triangles pointing up, down, left, or right by changing which border is colored.
Can I change the size of the CSS triangle?
Yes, adjust the border width to control the triangle size. A larger border value produces a bigger triangle. You can also set different widths for each side to create non-equilateral shapes.
Is there a simpler alternative to the border triangle technique?
CSS clip-path can create triangles with more intuitive syntax. However, the border technique has broader legacy browser support and remains the most widely used approach.

More in CSS & Design

All 22 css & design