mask-image-3f.html (1339B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>CSS Masking: mask-image: SVG masks apply on border area</title> 6 <link rel="author" title="CJ Ku" href="mailto:cku@mozilla.com"> 7 <link rel="author" title="Mozilla" href="https://www.mozilla.org"> 8 <link rel="help" href="https://www.w3.org/TR/css-masking-1/#the-mask-image"> 9 <link rel="match" href="mask-image-3-ref.html"> 10 <meta name="assert" content="Test checks whether SVG mask layer can be positioned on box-shadow area correctly or not."> 11 <meta name="fuzzy" content="0-1; 0-100"> 12 <svg height="0"> 13 <mask id="mask1" x="-100" y="-100" width="300" height="300" maskUnits="userSpaceOnUse"> 14 <rect x="-100" y="-100" width="50" height="50" style="stroke:none; fill: #ffffff"/> 15 </mask> 16 <mask id="mask2" x="-100" y="-100" width="300" height="300" maskUnits="userSpaceOnUse"> 17 <circle cx="-50" cy="-50" r="25" style="stroke:none; fill: #ffffff"/> 18 </mask> 19 </svg> 20 <style type="text/css"> 21 div { 22 background-color: red; 23 mask-image: url(#mask1), url(#mask2); 24 box-shadow: 0 0 0 100px purple; 25 width: 100px; 26 height: 100px; 27 position: relative; 28 left: 100px; 29 top: 100px; 30 } 31 </style> 32 </head> 33 <body> 34 <div></div> 35 </body> 36 </html>