源代码:
下载代码
AI 编程工具
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>菜鸟教程(runoob.com)</title> <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.248k.com/">菜鸟教程 》</a></div> <h2>pointer-events: auto (默认):</h2> <div class="ex2">访问 <a href="https://c.runoob.com/">菜鸟工具 》</a></div> </body> </html>
运行结果: