clip-path-polygon-009.html (1038B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>CSS Masking: Test clip-path and polygon with content-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-square-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 'content-box' for the polygon() function by mixing percentage 12 and absolute values as coordinates. On sucess you should see a green square 13 and no red."> 14 </head> 15 <style> 16 div { 17 width: 50px; 18 height: 50px; 19 background-color: green; 20 padding: 25px; 21 margin: 25px; 22 border: red solid 25px; 23 } 24 </style> 25 <body> 26 <p>The test passes if there is a green square and no red.</p> 27 <div style="clip-path: polygon(0% 0px, 50px 0%, 100% 50px, 0px 100%) content-box"></div> 28 </body> 29 </html>