Ter*_*rry 15
CSS指针事件是您想要查看的内容.在您的情况下,将指针事件设置为"无".看看这个JSFiddle的例子...... http://jsfiddle.net/dppJw/1/
请注意,双击图标仍会显示您单击该段落.
div.child {
...
background: #fff;
pointer-events: none //This line is the key!
}
Run Code Online (Sandbox Code Playgroud)
如果你想使用 JavaScript :
document.getElementById("x").style.pointerEvents = "none";Run Code Online (Sandbox Code Playgroud)
<a href="https://www.google.com" id="x" />Unclickable Google Link</a>
<br>
<a href="https://www.google.com" id="" />Clickable Google Link</a>Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
69103 次 |
| 最近记录: |