Get affordable and hassle-free WordPress hosting plans with Cloudways â start your free trial today. Hereâs a CSS variable (formally called a âCSS custom propertyâ): :root { --mouse-x: 0px; --mouse-y: 0px; } Perhaps you use them to set a position: .mover { left: var(--mouse-x); top: var(--mouse-y); } To update those values from JavaScript, youâd: let root = document.documentElement; root.addEventL


{{#tags}}- {{label}}
{{/tags}}