mask-opacity-1d.html (1107B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>CSS Masking: mask-image: mask with opacity</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-opacity-1-ref.html"> 10 <meta name="assert" content="Test checks whether apply opacity to masked element correctly or not."> 11 <meta name="fuzzy" content="maxDifference=0-5; totalPixels=0-5000" /> 12 <svg height="0"> 13 <mask id="myMask" x="0" y="0" width="100" height="100" > 14 <rect x="0" y="50" width="100" height="50" style="stroke:none; fill: #ffffff"/> 15 </mask> 16 </svg> 17 <style type="text/css"> 18 div { 19 position: absolute; 20 left: 10px; 21 top: 10px; 22 background-color: rgb(0,0,255); 23 width: 100px; 24 height: 100px; 25 mask-image: url(#myMask), url(#myMask); 26 opacity: 0.5; 27 } 28 </style> 29 </head> 30 <body> 31 <div></div> 32 </body> 33 </html>