I'm trying to make it so when you hover over a list item the current li pops out and all other list items fade out or blur out slightly. I would prefer all css, would anyone know how to select all the other li's except for current selected in css?
我试着让它,当你悬停在一个列表项上时,当前的li会弹出,所有其他的列表项会淡出或模糊。我更喜欢所有的css,谁知道如何选择所有其他的li的除了当前的css选择?
UPDATE
I dont believe this is possible to do in css therefore i'm trying to select it in jquery.
更新我不相信这在css中是可能的因此我尝试在jquery中选择它。
Heres the updated code with my not working jquery script http://jsfiddle.net/xKEHe/42/
这是用我不工作的jquery脚本http://jsfiddle.net/xKEHe/42/更新的代码
reference Hide all but $(this) via :not in jQuery selector
引用隐藏除了$(this)之外的所有内容:不在jQuery选择器中
1 个解决方案
#1
6
You can write like this:
你可以这样写:
ul:hover > #blah a{
opacity:0.5;
text-shadow: 0 0 2px #CACACA;
}
ul > #blah:hover a{
color:#222;
opacity:1;
text-shadow:none;
}
Check this: http://jsfiddle.net/xKEHe/46/
检查:http://jsfiddle.net/xKEHe/46/
#1
6
You can write like this:
你可以这样写:
ul:hover > #blah a{
opacity:0.5;
text-shadow: 0 0 2px #CACACA;
}
ul > #blah:hover a{
color:#222;
opacity:1;
text-shadow:none;
}
Check this: http://jsfiddle.net/xKEHe/46/
检查:http://jsfiddle.net/xKEHe/46/