我有一张button上面覆盖有 s 的图像。因为buttons 是半透明的,而且我不希望标签是这样,所以我在每个按钮上都覆盖了一个跨度(不透明度为 100%)。为了确保spans 不会拦截所有点击,我pointer-events: none;在 s 上使用了 css 属性span。
这是标记(Jade)的结构:
div.slide
div.controls.buttons
button.move.forward
button.move.back
button.info
div.controls.icons
span.move.forward.icon.ion-chevron-right
span.move.back.icon.ion-chevron-left
span.info.icon.ion-information
.icon.ion-*是离子图标字体的样式
渲染时是这样的:

问题是,因为我有,pointer-events:none;我不能在. 有没有办法在不使用的情况下将点击事件传播到下面的元素?:hover:active.icons spanpointer-events: none
我是否必须在每个按钮上放置一个侦听器,然后使用 javascript 触发点击事件?还是有更好的方法?