clip-path-polygon-008.html (1239B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>CSS Masking: Test clip-path and polygon with margin-box</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-stripes-002-ref.html"> 9 <meta name="assert" content="The clip-path property allows specifying 10 basic shapes and reference boxes. This test checks the usage of the correct 11 reference box 'margin-box' for the polygon() function by mixing percentage 12 and absolute values as coordinates. On sucess you should see a green 13 vertical stripe next to a lime green vertical stripe. Both should be of equal 14 size."> 15 </head> 16 <style> 17 div { 18 width: 50px; 19 height: 50px; 20 background-color: green; 21 padding: 25px; 22 margin: 25px; 23 border: red solid 25px; 24 border-left: lime solid 25px; 25 } 26 </style> 27 <body> 28 <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> 29 <div style="clip-path: polygon(12.5% 25%, 37.5% 50px, 75px 50%, 25px 100px) margin-box"></div> 30 </body> 31 </html>