Task path / input to outcome
How to create a CSS triangle
- 01
Pick the direction
Top right / Bottom right / Bottom left / Top left · 8
- 02
Set the size
Adjust Base width and Triangle height, each from 8 to 180 px in 1 px steps. For Up or Down, width is the base and height is the point's reach. For Left or Right, height is the vertical base and width is the horizontal reach. The default spans 72 px horizontally and 64 px vertically.
- 03
Choose the fill color
Set Fill color to any six-digit hex value — the default is #0f4cff. The live preview and the generated border-color declaration always stay in sync, so what you see is exactly what gets copied.
- 04
Check the preview status
The live preview re-renders on every change and the status badge reads VALID CSS when all values are in range. An out-of-range value flips it to CHECK VALUES and blocks copying and downloading until the highlighted control is fixed.
- 05
Try the sample preset
Press Load sample for a right-pointing triangle with 104 px horizontal reach, an 86 px vertical base, and #ffd11a fill. Reset restores the defaults at any time.
- 06
Copy or download the CSS
Press Copy CSS to copy the .triangle rule to the clipboard, or Download .css to save it as toolars-triangle.css. The rule sets width and height to zero and declares all four borders, ready to paste into any stylesheet. HTML includes the current CSS and a working example. Native controls support keyboard input.