Point of this is to set the position of the div to the mouse as a added effect, it was supposed to have a radius, but it didn’t work:
let inner_circle = document.getElementById("inner_circle");
window.addEventListener("mousemove", function(mouse) {
inner_circle.style.transform = `translate(${mouse.clientX}px, ${mouse.clientY}px)`; // sets the position of the inner circle to the mouse
});
#inner_circle{
margin-left: -3px;
margin-top: -3px;
position: fixed;
top: 0;
left: 0;
border: 1px solid #703be7;
border-radius: 50%; //<- doesn't work
font-size: 1px;
background-color: #703be7;
width: 6px;
width: 6px;
z-index: 1000001;
pointer-events: none;
}
<div id="inner_circle"></div>
2
Answers
I assume you meant height on the second line here and this makes it a problem
so just change it to height:
Change your css. width: 6px;width: 6px; to width: 6px;height: 6px;