User Rating 0.0
Total Usage 1 times
Category Css Tools
Is this tool helpful?

Your feedback helps us improve.

About

Modern CSS allows for the creation of complex geometric shapes without requiring SVG or PNG images. This reduces HTTP requests and improves loading speeds. This tool generates the code for common shapes using `border` tricks and `clip-path` properties.

css shapes clip-path

Formulas

Logic for Triangle (Border Method):

Width = 0, Height = 0
Border-Left = Size solid transparent
Border-Right = Size solid transparent
Border-Bottom = Size solid Color

Reference Data

MethodBrowser SupportProsCons
Border Hack99% (IE6+)Very compatibleLimited to triangles/trapezoids
Clip-Path96% (Modern)Any polygon shapeNo IE support
Border-Radius99%Circles/OvalsCannot do sharp angles easily

Frequently Asked Questions

When borders meet at a corner, they are mitered at a 45-degree angle. By making side borders transparent, only the colored bottom border remains visible as a triangle.
For `clip-path` shapes, yes, though text will be clipped if it overflows. For `border` hack shapes, no, because the element has 0 width and height.