Creating the HTML for a unique effect:
<svg class="svg-defs2" version="1.1" xmlns="http://www.w3.org/2000/svg" height="200" width="640">
<defs>
<clipPath id="clipping2">
<!--Adjusting the x-coordinate of start will expand the end accordingly-->
<path id="circle2" d='M30 190
A40 40 0 0 1 350 190
A40 40 0 0 1 30 190
z
M60 190
A10 10 0 0 1 320 190
A10 10 0 0 1 60 190
z' clip-rule='evenodd'/>
</clipPath>
</defs>
</svg>
<!-- Working with SVG images -->
<div class="wrapper">
<img src="http://s26.postimg.org/mogt0be2h/Black.png" height="381" width="379" alt="Black Circuit">
<div class="toBeMasked">
<svg width="381" height="379">
<image xlink:href="http://s26.postimg.org/ie254q8zd/pink.png" width="381" height="379" alt="Pink Circuit"/>
</svg>
</div>
<div class="toBeMasked2">
<svg width="381" height="379">
<image xlink:href="http://s26.postimg.org/623u4zaih/blue.png" width="381" height="379" alt="blue Circuit"/>
</svg>
</div>
</div>
<!-- End of SVG code -->
CSS styling applied to achieve the desired effects:
.wrapper {
width: 382px;
clear: both;
background: #535353;
}
.toBeMasked {
position: absolute;
top: 0;
}
.svg-defs {
position: absolute;
width: 0;
height: 0;
}
.bullseye {
position: absolute;
top: 0;
}
/* Animation for circle */
.svg-defs #circle {
visibility: hidden;
transform-origin: center center;
-webkit-animation: move-mask running 1.5s ease;
-moz-animation: move-mask running 1.5s ease;
-o-animation: move-mask running 1.5s ease;
animation: move-mask running 1.5s ease;
}
/* Keyframes and animation details */
@keyframes move-mask {
0% {
visibility: visible;
-webkit-transform: scale(0, 0);
-moz-transform: scale(0, 0);
transform: scale(0, 0);
}
100% {
-webkit-transform: scale(2, 2);
-moz-transform: scale(2, 2);
transform: scale(2, 2);
}
}
/* Additonal animations for masking*/
.toBeMasked2 {
position: absolute;
top: 0;
}
.svg-defs2 { position: absolute; width: 0; height: 0;}
.svg-defs2 #circle2 {
transform-origin: center center;
-webkit-animation: move-mask2 running 1.5s ease;
-moz-animation: move-mask2 running 1.5s ease;
-o-animation: move-mask2 running 1.5s ease;
animation: move-mask2 running 1.5s ease;
animation-delay: 1.5s;
visibility: hidden;
}
/* Additional keyframe animatons */
@keyframes move-mask2 {
0% {
visibility: visible;
transform: scale(2, 2);
}
100% {
transform: scale(0, 0);
}
}
If you'd like to view the working code, check out this link on jsfiddle:
http://jsfiddle.net/shettyrahul8june/9dua7Lr8/
The code functions well on Google Chrome but experiences issues with clipping images on Mozilla. To address this, inline styling was added to the image's style attribute for clipping purposes. However, this caused animation problems specifically on Mozilla browsers. Any suggestions or assistance would be greatly appreciated.