Skip to content

Instantly share code, notes, and snippets.

View traversable-dale's full-sized avatar

traversable-dale

View GitHub Profile
const cursor = document.createElement('div');
cursor.style.cssText = `
position: fixed;
width: 12px;
height: 12px;
background: #4C00FF;
border-radius: 50%;
pointer-events: none;
Z-index: 99999;
transform: translate(-50%, -50%) ;
const cursor = document.createElement('div');
cursor.style.cssText = `
position: fixed;
width: 12px;
height: 12px;
background: #4C00FF;
border-radius: 50%;
pointer-events: none;
Z-index: 99999;
transform: translate(-50%, -50%) ;
onst cursor = document.createElement('div'); cursor.style.cssText = ` position: fixed; width: 12px; height: 12px; background: #4C00FF; border-radius: 50%; pointer-events: none; z-index: 99999; transform: translate(-50%, -50%); transition: left 0.06s ease, top 0.06s ease; `; document.body.appendChild(cursor); document.addEventListener('mousemove', (e) => { cursor.style.left = e.clientX + 'px'; cursor.style.top = e.clientY + 'px'; });