SVG mask demo

HTML
<div class='box'> <svg> <mask id='m' fill='#fff'> <rect id='r' width='100%' height='100%'/> <circle id='c' r='50' fill='#000'/> <use xlink:href='#c' x='100%'/> <use xlink:href='#c' y='100%'/> <use xlink:href='#c' x='100%' y='100%'/> </mask> <use xlink:href='#r' fill='slateblue' mask='url(#m)'/> </svg> </div>
CSS
.box { position: relative; margin: .75em auto 0; max-width: 500px; min-height: 10em; } svg { position: absolute; width: 100%; height: 100%; }
JAVASCRIPT
Expand for more options Login