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