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;