微信小程序 穿透属性 pointer-events 使用
pointer-events是css的一个属性
pointer-events: auto; // 与未指定pointer-events一致。与 visiblePainted效果相同 pointer-events: none; // 元素永远不会触发点击事件,会冒泡的下去 pointer-events: visiblePainted; /* SVG only */ pointer-events: visibleFill; /* SVG only */ pointer-events: visibleStroke; /* SVG only */ pointer-events: visible; /* SVG only */ pointer-events: painted; /* SVG only */ pointer-events: fill; /* SVG only */ pointer-events: stroke; /* SVG only */ pointer-events: all; /* SVG only */ /* Global values */ pointer-events: inherit; pointer-events: initial; pointer-events: unset;
在微信小程序中需要注意的是不能放置再组件中使用 pointer-events: none,但是可以在组件中设置 pointer-event: auto;