Today encountered a problem, in the mobile phone embedded ifram, in the iOS and pad will only display the first screen content, the following content is loaded but all below, cannot slide display,
So I took a look at it. (Tested available)
Add the following CSS style to the parent container of the IFRAME:
-webkit-overflow-scrolling:touch;overflow:auto;
For Android less than 4.0 version of the browser does not support overflow problem, you can use the following JS resolution (not valid for UC):
functionTouchscroll (ID) {varEl =document.getelementbyidx_x (ID); varScrollstartpos = 0; document.getelementbyidx_x (ID). AddEventListener ("Touchstart",function(event) {Scrollstartpos= This. scrolltop + event.touches[0].pagey; Event.preventdefault (); }, false); document.getelementbyidx_x (ID). AddEventListener ("Touchmove",function(event) { This. scrolltop = Scrollstartpos-event.touches[0].pagey; Event.preventdefault (); }, false); }
Solve the problem of ifram not sliding in iOS and pad