W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
运行代码
<!DOCTYPE html> <html> <head> <style> div.ex1 { pointer-events: none; } div.ex2 { pointer-events: auto; } </style> </head> <body> <h1>pointer-events 属性</h1> <p>请把鼠标指针移至下面的链接,查看是否对指针事件做出反应:</p> <h2>pointer-events: none:</h2> <div class="ex1">访问 <a href="https://www.w3school.org.cn/html/">HTML 教程</a></div> <h2>pointer-events: auto(默认)</h2> <div class="ex2">访问 <a href="https://www.w3school.org.cn/css/">CSS 教程</a></div> </body> </html>