Eri*_*tis 33 html css position z-index
可能重复:
通过覆盖元素<div>传递鼠标
是否可以点击红色方块下面的链接而不用javascript?红色div不需要是可点击的.
http://jsfiddle.net/efortis/LNwHV/
#bottom{
width: 100px;
height: 100px;
background-color: orange;
}
#top{
width: 50px;
height: 50px;
position: absolute;
left:0;
top:0;
background-color: rgba(255,0,0,.5);
}
Run Code Online (Sandbox Code Playgroud)
thi*_*dot 76
这样做的CSS方法是 pointer-events: none
见: http ://jsfiddle.net/LNwHV/1/
浏览器支持:http://caniuse.com/pointer-events(除了IE10和更旧版本以外的任何地方都可以使用)
要支持旧版本的IE,您必须使用JavaScript作为后备.