# CSS Triangle Generator

> Point CSS triangles in 8 directions with the border trick, adjustable size and color, live preview. Copy zero-size border CSS — no images or SVG.

[bfotkit](/) Runs in your browserCategories ▾[All tools 307](/en/tools/)[Text tools9](/en/tools/text-tools/)[Image tools27](/en/tools/image-tools/)[PDF tools20](/en/tools/pdf-tools/)[Social media tools97](/en/tools/social-media-tools/)[Security tools8](/en/tools/security-tools/)[Coding tools25](/en/tools/coding-tools/)[CSS tools12](/en/tools/css-tools/)[Color tools6](/en/tools/color-tools/)[Miscellaneous tools103](/en/tools/miscellaneous-tools/)

[All tools ↗](/en/tools/)[EN](/en/tools/css-triangle-generator/)[PT](/pt-br/ferramentas/gerador-triangulo/)[DE](/de/werkzeuge/dreieck-generator/)[ID](/id/alat/generator-segitiga/)[RU](/ru/instrumenty/generator-treugolnika/)

CSS TOOLS · BFOTKIT

# CSS Triangle Generator | BFOTKit

Point triangles in any direction with a chosen size and color and copy the classic zero-size border CSS — no images, no SVG.

CSSCopy CSSReset

Everything is generated locally in this browser tab. Nothing is sent to a server.

GUIDE

## How the CSS triangle works

### The border trick explained

A CSS border is drawn as four trapezoids meeting at the middle. On an element with zero size and thick borders, setting three borders to transparent leaves one visible trapezoid — a triangle. The generator writes exactly that.

### Point it anywhere

The eight directions cover the common cases: four cardinal directions for tooltips and arrows, four diagonals for corner markers. Width and height control the triangle shape; equal values give a right-angle look, differing values an isosceles.

### Use it inline, size it in em

Placing the snippet inside a button or label inherits font size, so defining width and height in em keeps the arrow proportional to the text next to it.

HELP / FAQ

## Triangle generator questions

### Why not just use an SVG?

You can — SVG is more readable. The border trick wins when you want zero extra requests and the shape to inherit color via currentColor. Both are valid; this tool serves the CSS-native route.

### Can the triangle have a border of its own?

Not directly. Layer two triangles — a slightly larger one behind in the border color and the inner one in the fill color — to fake an outlined arrow.

### Does it work in flexbox or grid?

Yes. The element is a normal box with zero content size; alignment properties position it like any other inline item.

### Why do I see a thin line artifact?

Some browsers antialias diagonal border edges faintly. Slightly overlapping the triangle with its parent background, or using a 0.5px offset, hides the artifact.

EXPLORE BY CATEGORY · BFOTKIT

## More tools like this

Pick a category to see every tool in it — then open one and discover related tools.

[All tools 307](/en/tools/)[Text tools 9](/en/tools/text-tools/)[Image tools 27](/en/tools/image-tools/)[PDF tools 20](/en/tools/pdf-tools/)[Social media tools 97](/en/tools/social-media-tools/)[Security tools 8](/en/tools/security-tools/)[Coding tools 25](/en/tools/coding-tools/)[CSS tools 12](/en/tools/css-tools/)[Color tools 6](/en/tools/color-tools/)[Miscellaneous tools 103](/en/tools/miscellaneous-tools/)

[CSS toolsCSS Gradient Generator↗](/en/tools/css-gradient-generator/)[CSS toolsCSS Border Radius Generator↗](/en/tools/css-border-radius-generator/)[CSS toolsCSS Box Shadow Generator↗](/en/tools/css-box-shadow-generator/)[CSS toolsCSS Clip Path Generator↗](/en/tools/css-clip-path-generator/)[CSS toolsCSS Cubic Bezier Generator↗](/en/tools/css-cubic-bezier-generator/)[CSS toolsCSS Loader Generator↗](/en/tools/css-loader-generator/)[CSS toolsCSS Background Pattern Generator↗](/en/tools/css-background-pattern-generator/)[CSS toolsCSS Glassmorphism Generator↗](/en/tools/css-glassmorphism-generator/)

[Browse all tools →](/en/tools/)

[bfotkit](/)[All tools](/en/tools/)[Privacy Policy](/en/privacy-policy/)[Terms & Conditions](/en/terms-and-conditions/)[About Us](/en/about-us/)[Contact Us](/en/contact-us/)

Useful tools. No fuss. © 2026 BFOTKit[bfotkit.com ↗](https://bfotkit.com/)
