clip-path-polygon-008.html (1377B)
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 margin-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-stripes-002-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 'margin-box' for the polygon() function by mixing percentage 16 and absolute values as coordinates. On sucess you should see a green 17 vertical stripe next to a lime green vertical stripe. Both should be of equal 18 size."> 19 </head> 20 <style> 21 div { 22 width: 50px; 23 height: 50px; 24 background-color: green; 25 padding: 25px; 26 margin: 25px; 27 border: red solid 25px; 28 border-left: lime solid 25px; 29 } 30 </style> 31 <body> 32 <p>The test passes if you see a green vertical stripe next to a lime green vertical stripe, both stripes should be of equal size and there should be no red.</p> 33 <div style="clip-path: polygon(12.5% 25%, 37.5% 50px, 75px 50%, 25px 100px) margin-box"></div> 34 </body> 35 </html>