微信小程序 穿透屬性 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;


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM