clip-path-shape-001.html (858B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>CSS Masking: Test clip-path property and shape function with nonzero fill</title> 5 <link rel="help" href="https://drafts.csswg.org/css-shapes-2/#funcdef-shape"> 6 <link rel="match" href="reference/clip-path-path-001-ref.html"> 7 <meta name="assert" content="The clip-path property takes the basic shape 8 'shape()' for clipping. Test nonzero path function. On pass you should 9 see a green square."> 10 </head> 11 <style> 12 #rect { 13 width: 100px; 14 height: 100px; 15 background-color: green; 16 clip-path: shape(nonzero from 10px 10px, 17 hline by 80px, vline by 80%, hline by -80%, close, 18 move to 25px 25px, hline by 50px, vline by 50px, hline by -50%, close); 19 } 20 </style> 21 <body> 22 <p>The test passes if there is a green filled rect.</p> 23 <div id="rect"></div> 24 </body> 25 </html>