[英]CSS if an element hover than element active change
It's possible to achieve this in any way?有可能以任何方式实现这一目标吗? If the btn "home" on state :active is red and visible, when I move the mouse :hover on another btn "about" it's possible to change the opacity of "home" :active and make it disappear?
如果状态 :active 上的 btn "home" 是红色且可见的,当我移动鼠标时:将鼠标悬停在另一个 btn "about" 上,是否可以更改 "home" 的不透明度:active 并使其消失?
add class home to the active and class about to the not active将班级添加到活动和即将不活动的班级
$(document).ready(function () {
$(".home").mouseover(function () {
$(".about").addClass("active");
$(".home").removeClass("active");
});
$(".about").mouseover(function () {
$(".home").addClass("active");
$(".about").removeClass("active");
});
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.