mask-image-3g.html (1631B)
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 apply transfrom to a SVG mask layer works 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.outter { 22 margin: 0px; 23 padding: 0px; 24 width: 200px; 25 height: 200px; 26 transform: translate(-10px, -20px); 27 } 28 div.inner { 29 background-color: red; 30 mask-image: url(#mask1), url(#mask2); 31 mask-repeat: no-repeat, no-repeat; 32 box-shadow: 0 0 0 100px purple; 33 position: relative; 34 width: 100px; 35 height: 100px; 36 left: 100px; 37 top: 100px; 38 transform: translate(10px, 20px); 39 } 40 </style> 41 </head> 42 <body> 43 <div class="outter"> 44 <div class="inner"></div> 45 </div> 46 </body> 47 </html>