clip-path-polygon-003.html (898B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>CSS Masking: Test clip-path property and polygon function with absolute and percentage values</title> 5 <link rel="author" title="Dirk Schulze" href="mailto:dschulze@adobe.com"> 6 <link rel="help" href="http://www.w3.org/TR/css-masking-1/#clipping-paths"> 7 <link rel="help" href="http://www.w3.org/TR/css-masking-1/#propdef-clip-path"> 8 <link rel="match" href="reference/clip-path-rectangle-ref.html"> 9 <meta name="assert" content="The clip-path property takes the basic shape 10 'polygon' for clipping. Test absolute and percentage value arguments. On 11 pass you should see a green square and no red."> 12 </head> 13 <body> 14 <p>The test passes if there is a green box.</p> 15 <div style="width: 150px; height: 100px; border: solid red 50px; background-color: green; position: absolute; clip-path: polygon(20% 50px, 200px 25%, 200px 150px, 20% 75%)"></div> 16 </body> 17 </html>