you can remove active class on mouseleave event as below:
panel2.addEventListener("mouseover", () => {
panel2.classList.add("active-s-c-cardexp");
});
panel2.addEventListener("mouseleave", () => {
removeActiveclasses2();
});
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…