Yes, you CAN do this.
(是的,你可以做到这一点。)
Using pointer-events: none
along with CSS conditional statements for IE11 (does not work in IE10 or below), you can get a cross browser compatible solution for this problem.
(使用pointer-events: none
与IE11一起使用的CSS条件语句(在IE10或更低版本中不起作用),您可以获得针对此问题的跨浏览器兼容解决方案。)
Using AlphaImageLoader
, you can even put transparent .PNG/.GIF
s in the overlay div
and have clicks flow through to elements underneath.
(使用AlphaImageLoader
,您甚至可以将透明.PNG/.GIF
放置在叠加div
并使点击流到下面的元素。)
CSS:
(CSS:)
pointer-events: none;
background: url('your_transparent.png');
IE11 conditional:
(IE11条件:)
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='your_transparent.png', sizingMethod='scale');
background: none !important;
Here is a basic example page with all the code.
(这是带有所有代码的基本示例页面 。)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…