1 line
397 B
JavaScript
1 line
397 B
JavaScript
(()=>{"use strict";document.addEventListener("DOMContentLoaded",(()=>{(()=>{const e=document.querySelector(".magic-cards");e&&(e.onmousemove=e=>{const t=document.getElementsByClassName("card");for(let o=0;o<t.length;o++){const n=t[o],s=n.getBoundingClientRect(),c=e.clientX-s.left,l=e.clientY-s.top;n.style.setProperty("--mouse-x",`${c}px`),n.style.setProperty("--mouse-y",`${l}px`)}})})()}))})(); |