Javascript 元素在删除JS时消失
我的网站的源代码: 这是一个简单的网站,但元素Javascript 元素在删除JS时消失,javascript,html,css,web,Javascript,Html,Css,Web,我的网站的源代码: 这是一个简单的网站,但元素正在引起麻烦 问题是当我删除JS时,元素的背景颜色会发生变化并且消失 其CSS如下: #rect { content: " "; height: 80vh; width: 22vw; position: absolute; top: 10vh; left: 50vw; background-color: #000; border-radius: 0px; pointer-events: none
正在引起麻烦
问题是当我删除JS时,元素的背景颜色会发生变化并且消失
其CSS如下:
#rect {
content: " ";
height: 80vh;
width: 22vw;
position: absolute;
top: 10vh;
left: 50vw;
background-color: #000;
border-radius: 0px;
pointer-events: none;
filter: invert(100%);
mix-blend-mode: difference;
}
除非js没有被移除,否则不会造成问题JS是: 但事实是这个JS与它无关 请帮助我,我认为问题在于HTML
let mousecircle = document.getElementById("circle");
let logo = document.querySelector("#logoa");
document.addEventListener("mousemove", cursor);
function cursor(e) {
mousecircle.style.top = e.pageY + "px";
mousecircle.style.left = e.pageX + "px";
}