iFrame scrolling not working on iOS devices

人盡茶涼 提交于 2019-12-26 10:48:04

问题


I have responsive site which have an issue of scrolling because of iFrame.

# Problem

> Open site in iPhone in any browser
> list of images and video display
> Try to scroll down then it's work while images but when video then scrolling not worked because of video display in iFrame and iOS device not allow to scroll on `iFrame`.

Is there any CSS trick or any particular issue with iOS devices?

It's not work in iPhone / iPad.

NOTE: I do not want to scroll into iFrame but page scroll not working when touch on iFrame and try to page down. Got it?

Let me know if any one sort this issue or any trick.

Thanks


回答1:


Try,

.iframe-container {
    overflow:scroll !important; -webkit-overflow-scrolling:touch !important;
}



回答2:


Try adding this to the iframe container:

-webkit-overflow-scrolling: touch;


来源:https://stackoverflow.com/questions/45212227/iframe-scrolling-not-working-on-ios-devices

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!