Scrolling with single finger gesture for <object> element- IPAD not working

冷暖自知 提交于 2019-12-23 04:29:23

问题


I have an weird requirement. I want to scroll the embedded pdf within <object> or <embed> element with one finger. As of now I am able to scroll the embedded content with two fingers.

Tried following elements
1. <object>
2. <embed>

Read many articles and got to know that two fingers scroll gesture is standard practice by Apple. Still want to try my luck.

Any help would be appreciated.

Thanks in advance.


回答1:


Although I’ve no explanation why Mobile Safari explicitly needs this, adding overflow: auto; -webkit-overflow-scrolling: touch; to the container makes the PDF scrollable.




回答2:


overflow: auto; -webkit-overflow-scrolling: touch; is a workaround for <iframe> elements. It doesn't work for the <object> elements, which is a more natural way to embed a pdf.



来源:https://stackoverflow.com/questions/43186427/scrolling-with-single-finger-gesture-for-object-element-ipad-not-working

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