<html>
<body>
<h2>SVG mask Element</h2>
<svg width="200" height="120" xmlns="http://www.w3.org/2000/svg">
<defs>
<mask id="mask1">
<rect x="0" y="0" width="100" height="30" fill="#232323" />
<rect x="0" y="30" width="100" height="40" fill="#454545" />
<rect x="0" y="70" width="100" height="30" fill="#878787" />
</mask>
</defs>
<rect x="0" y="0" width="100" height="100" fill="red" mask=" url(#mask1)"/>
Sorry, your browser does not support inline SVG.
</svg>
</body>
</html>