mask-image-3e.html (1374B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>CSS Masking: mask-image: interleave SVG mask with image mask</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 and image as mask layer works correctly or not."> 11 <meta name="fuzzy" content="0-1; 0-100"> 12 <svg height="0"> 13 <mask id="mask1" x="0" y="0" width="1" height="1" > 14 <circle cx="50" cy="50" r="25" style="stroke:none; fill: #ffffff"/> 15 </mask> 16 </svg> 17 <style type="text/css"> 18 div.outter { 19 margin: 0px; 20 padding: 0px; 21 width: 200px; 22 height: 200px; 23 transform: translate(-10px, -10px); 24 } 25 div.inner { 26 background-color: purple; 27 mask-image: url(support/50x50-opaque-blue.svg), url(#mask1); 28 mask-repeat: no-repeat, repeat; 29 mask-position: 0 0, 0 0; 30 /*mask: url(#mask1);*/ 31 width: 100px; 32 height: 100px; 33 transform: translate(10px, 10px); 34 } 35 </style> 36 37 </head> 38 <body> 39 <div class="outter"> 40 <div class="inner"></div> 41 </div> 42 </body> 43 </html>