[英]prevent scrolling from iframe but still clickable javascript
Is it possible to use the parent scroll when I start the scroll from the embedded iframe?当我从嵌入的 iframe 开始滚动时,是否可以使用父滚动? Currently I'm using
pointer-event: none
but the embedded iframe prevents clickable events.目前我正在使用
pointer-event: none
但嵌入的 iframe 会阻止可点击事件。 I tried also manipulate other events like touchmove
but I failed.我也尝试操纵其他事件,如
touchmove
但我失败了。 Feel free to answer and thank you in advance!请随时回答并提前感谢您!
It's not possible to scroll the parent page from an iframe.无法从 iframe 滚动父页面。 However, you could consider using
embed
instead of iframe
.但是,您可以考虑使用
embed
而不是iframe
。 This will give you more control over how scroll works.这将使您更好地控制滚动的工作方式。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.