设置元素是否对鼠标事件做出反应
div.ex1 {
pointer-events: none;
}
div.ex2 {
pointer-events: auto;
}
<h2>pointer-events: none:</h2>
<div class="ex1">访问(不会跳转) <a href="https://www.runoob.com/">菜鸟教程 》</a></div>
<h2>pointer-events: auto (默认):</h2>
<div class="ex2">访问 <a href="https://c.runoob.com/">菜鸟工具 》</a></div>