css3属性 pointer-events: none 在小程序中不生效
- 当前 Bug 的表现(可附上截图)
在map上利用cover-view和cover-image放置了一张图片,并设置pointer-events: none;属性,在开发者工具中可正常对底层地图进行操作,
在手机上无法对底层地图进行拖曳、缩放等操作(点击穿透未生效)
- 预期表现
在手机上可对底层地图进行拖曳、缩放等操作(既实现点击穿透效果)
-
复现路径
-
提供一个最简复现 Demo
<map id=“map”
longitude=“113.324520”
latitude=“23.099994”
scale=“16”
show-location>
<cover-view>
// 图片自己放
<cover-image src=“/static/img/test3.png”/>
</cover-view>
</map>
////////////////////////////////////////////////////////////////////////////////
#map {
overflow: hidden;
width: 690rpx;
height: 500rpx;
position: relative;
}
cover-view {
pointer-events: none;
position: absolute;
left: 0;
top: 0;
}
cover-image {
width: 690rpx;
height: 500rpx;
pointer-events: none;
}
