svg-clip-path-fixed-values.html (966B)
1 <!doctype html> 2 <link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org"> 3 <link rel="help" href="https://drafts.csswg.org/css-shapes/#supported-basic-shapes"> 4 <link rel="match" href="svg-clip-path-fixed-values-ref.html"> 5 <meta name="fuzzy" content="maxDifference=0-62; totalPixels=0-990"> 6 <meta name="assert" content="clip-path clips correctly"> 7 <style> 8 svg { 9 width: 300px; 10 height: 300px; 11 } 12 .bg1 { fill: green; } 13 .cp1 { clip-path: polygon(0px 0px, 100px 0px, 0px 100px); } 14 .cp2 { clip-path: circle(50px); } 15 .cp3 { clip-path: ellipse(50px 30px); } 16 .cp4 { clip-path: inset(10px 20px 30px 40px); } 17 </style> 18 <svg> 19 <rect class="bg1" x="100" y="100" width="100" height="100"/> 20 <rect class="bg1 cp1" x="0" y="0" width="100" height="100"/> 21 <rect class="bg1 cp2" x="0" y="200" width="100" height="100" /> 22 <rect class="bg1 cp3" x="200" y="200" width="100" height="100" /> 23 <rect class="bg1 cp4" x="200" y="0" width="100" height="100" /> 24 </svg>