clip-path-shape-002.html (859B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>CSS Masking: Test clip-path property and shape function with evenodd 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-002-ref.html"> 7 <meta name="assert" content="The clip-path property takes the basic shape 8 'shape()' for clipping. Test evenodd path function. On pass you should 9 see a green hollow square."> 10 </head> 11 <style> 12 #rect { 13 width: 100px; 14 height: 100px; 15 background-color: green; 16 clip-path: shape(evenodd from 10px 10px, 17 hline by 80px, vline by 80%, hline by -80px, close, 18 move to 25% 25px, hline by 50px, vline by 50px, hline by -50%); 19 } 20 </style> 21 <body> 22 <p>The test passes if there are a green hollow rect.</p> 23 <div id="rect"></div> 24 </body> 25 </html>