JSFiddle - React, Tailwind, and code Playground
HTML
<svg>
<defs>
<mask id="cursorMask" maskUnits="objectBoundingBox" maskContentUtils="objectBoundingBox">
<g>
<rect x="0" y="0" width="1600" height="700" fill="#FFFFFF" />
<circle cx="0" cy="0" r="60" stroke="black" stroke-width="0" fill="black" fill-opacity="1" />
</g>
</mask>
</defs>
<image width="1600" height="700" xlink:href="https://41.media.tumblr.com/e91c999c320c29a28053c6a933da1e81/tumblr_mkjnibe1xH1s9yt1no1_500.png" />
<image width="1600" height="700" xlink:href="http://www.liftopia.com/media/product/275/102102_Ski-Banff-Lake-Louise-Sunshine-1-Day-Lift-Tickets.jpg" />
</svg>
CSS
body {
background-color: yellow;
}
svg {
width: 1600px;
height: 700px;
}
image:hover {
mask: url("#cursorMask");
}
JavaScript
var img = document.getElementsByTagName("image")[1];
var imgPos = img.getBoundingClientRect();
var imgX = imgPos.left;
var imgY = imgPos.top;
var rect = document.getElementsByTagName("circle")[0];
var rectHalfWidth = rect.getAttribute("width") / 2;
var rectHalfHeight = rect.getAttribute("height") / 2;
img.addEventListener("mousemove", function (e) {
rect.setAttribute("cx", e.clientX - imgX - rectHalfWidth);
rect.setAttribute("cy", e.clientY - imgY - rectHalfHeight);
}, false);