如何在打开的地图中禁用鼠标交互或滚动iframe
?
我有以下内容并放置了属性scrollwheel="false"
有没有一种方法可以通过 css 禁用滚动或通过 css 交互?
<iframe id= "mapsource" scrollwheel="false" src="http://www.openstreetmap.org/export/embed.html?bbox=-123.21233510971068%2C49.260691198361066%2C-123.18484783172607%2C49.27329289319553&layer=mapquest&marker=49.26699244809891%2C-123.19858074188232"></iframe>
我愿意接受其他选项,例如使用 javascript 来禁用滚动?
Try pointer-events: none;
#mapsource {
pointer-events: none;
}
<iframe id= "mapsource" scrollwheel="false" src="http://www.openstreetmap.org/export/embed.html?bbox=-123.21233510971068%2C49.260691198361066%2C-123.18484783172607%2C49.27329289319553&layer=mapquest&marker=49.26699244809891%2C-123.19858074188232"></iframe>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)