它使所有内容变得模糊,甚至 .not
或 :not
元素也是如此
$("#team").mouseenter(function(){
$('body').not('#team').css("-webkit-filter", "blur(2px)");
});
$("p").mouseleave(function(){
$('body').not('#team').css("-webkit-filter", "blur(0px)");
});
最佳答案
你正在做 body,而不是 body#team。
未经测试但应该这样做:
$('body').find('*').not('#team').css(/* whatever */)
关于jquery - 我想定位除一个元素之外的 body 标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44870640/