clip-path-reference-box-002.html (748B)
1 <!DOCTYPE html> 2 <title>CSS Masking: clip path with floated element</title> 3 <link rel="author" title="Fredrik Söderquist" href="mailto:fs@opera.com"> 4 <link rel="help" href="https://drafts.fxtf.org/css-masking-1/#the-clip-path"> 5 <link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=418484"> 6 <link rel="match" href="reference/clip-path-reference-box-002-ref.html"> 7 <meta name="assert" content="Check that the 'clip-path' property uses the border box as the reference box."> 8 9 <style> 10 .clipped { 11 width: 100px; 12 height: 200px; 13 background-color: green; 14 clip-path: polygon(0% 0%,100% 0%,100% 50%,0% 50%); 15 } 16 </style> 17 <div class="clipped"> 18 <div style="float:left; margin-left:-100px; margin-top:-100px;"> </div> 19 </div>