CSS Shape Generator
Generate CSS border-radius for rounded shapes and pure CSS triangles. Live preview with copy-ready code.
About CSS Shape Generator
Generate CSS code for two fundamental CSS shapes: rounded corners using border-radius and pure CSS triangles using the border trick. Both techniques are widely used in UI design for buttons, cards, tooltips, and decorative elements.
How CSS Triangles Work
CSS triangles exploit the fact that element borders meet at angles. By setting an element to zero width and height and making three borders transparent while one is colored, the colored border appears as a triangle. No images or SVG needed.
Frequently Asked Questions
border-radius property rounds the corners of an element. You can set all four corners at once or individually. Using 50% on a square element creates a perfect circle; 999px or a very large value creates a pill/stadium shape.border-radius works on any HTML element. It applies to the element's background and border, but not to content that extends beyond the box unless you also add overflow: hidden.