property
Clip rule — CSS reference
Controls inside/outside classification for an SVG clipping geometry with overlapping subpaths. With evenodd, an area inside two nested same-direction contours is excluded; nonzero includes it when winding does not cancel. Apply the rule to the geometry inside clipPath, not to the clipped rectangle.
Formal Syntax & Structure
css syntaxcss
clip-rule: evenodd;Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>clip-rule</title><style>body{margin:8px;font:16px/24px sans-serif}#a{clip-rule:evenodd}</style><body><svg width="100" height="100"><defs><clipPath id="c"><path id="a" d="M0 0H100V100H0Z M25 25H75V75H25Z"/></clipPath></defs><rect width="100" height="100" fill="red" clip-path="url(#c)"/></svg></body></html>