clip-path-rect-002.html (641B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>CSS Masking: Test clip-path property and rect function</title> 5 <link rel="help" href="https://drafts.csswg.org/css-shapes-1/#funcdef-basic-shape-rect"> 6 <link rel="match" href="reference/clip-path-rectangle-ref.html"> 7 <meta name="assert" content="The clip-path property takes the basic shape 8 'rect()' for clipping. On pass you should see a green rect."> 9 </head> 10 <style> 11 #rect { 12 width: 400px; 13 height: 200px; 14 background-color: green; 15 clip-path: rect(25% 50% 75% 12.5%); 16 } 17 </style> 18 <body> 19 <p>The test passes if there is a green box.</p> 20 <div id="rect"></div> 21 </body> 22 </html>