clip-path-polygon-006.html (1171B)
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 and polygon with padding-box</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-square-001-ref.html"> 13 <meta name="assert" content="The clip-path property allows specifying 14 basic shapes and reference boxes. This test checks the usage of the correct 15 reference box 'padding-box' for the polygon() function by mixing percentage 16 and absolute values as coordinates. On sucess you should see a green square 17 and no red."> 18 </head> 19 <style> 20 div { 21 width: 50px; 22 height: 50px; 23 background-color: green; 24 padding: 25px; 25 margin: 25px; 26 border: red solid 50px; 27 } 28 </style> 29 <body> 30 <p>The test passes if there is a green square and no red.</p> 31 <div style="clip-path: polygon(0% 0%, 100% 0%, 100px 100%, 0 100px) padding-box"></div> 32 </body> 33 </html>