CSS Triangle Generator
Controls the triangle base; left/right borders are half of this.
Controls the triangle height.
Similar CSS Tools
View AllTriangle Generator Guide
What it does
Generate CSS-only triangles for tooltips, arrows or pointers. Choose direction, color, and size—then copy the ready-to-use CSS.
How to use
- Pick a direction (up, down, left, right) to orient the triangle.
- Choose a color via the color picker or paste a HEX code.
- Adjust size with the number field or slider until it fits your design.
- Preview updates in real time; copy the CSS snippet when satisfied.
- Paste the CSS into your stylesheet and add the triangle class to your element.
Tips
Use relative sizing (e.g., rem) by converting the px values after copying. Keep triangles small for subtle pointers; larger sizes work well for banners or hero accents.
FAQ
Notes
- Keep triangle size reasonable (10-200px) to avoid dominating layouts.
- When rotating, set transform-origin to the tip for predictable positioning.
- Match triangle color with the attached element background for seamless look.
- Use high-contrast colors if the triangle is used as an indicator on varied backgrounds.