<script>
window.addEventListener('mousemove', (e) => {
    if (window.angular) { return; }

    var mouseX = e.clientX - 15; // Use clientX for viewport relative position
    var mouseY = e.clientY - 15; // Use clientY for viewport relative position
    var cursor = document.querySelector('.custom-cursor');

    requestAnimationFrame(() => {
        cursor.style.transform = `translate3D(${mouseX + window.scrollX}px, ${mouseY + window.scrollY}px, 0)`;
    });
});




</script>

<style>
  .custom-cursor {
    position: absolute;
    width: 48px;
    height: 48px;
   
    border-radius: 50%; /* Make it round */
    pointer-events: none; /* Ignore mouse events */
    transition: transform 0.1s ease; /* Smooth transition */
}
</style>
Where to Next

Tag: Marketing Automation