有没有办法使用 CSS 指针事件仅应用于文本,例如在 div 中?这似乎适用于 SVG,但是否还有一个仅适用于常规文本元素的属性?
这就是我想要实现的目标:
<div style="width: 500px; height: 500px">
Fire only when this text is clicked!
<p><!--Don't fire in this space--></p>
Fire here too!
</div>
我不想在父 div 中创建一个孩子来捕获事件。
提前致谢!