Webview iframe overflow

前端 未结 4 1050
Happy的楠姐
Happy的楠姐 2020-12-28 12:43

I\'m currently building a web app in android. My app runs in a webview, and loads third-party contents through iframes. The iframe size is fixed and supposed not to be chang

4条回答
  •  -上瘾入骨i
    2020-12-28 13:26

    Tony. In my opinion, the key point of this trick is that you have to fix the height of the iframe. Then you can apply the iscroll to any div element in the iframe. Here is a small code snippet:

        // disable default touchmove handler
        document.addEventListener('touchmove', function(e){
            e.preventDefault();
        });
        // make the div 'list' scrollable
        var myScroll = new iScroll('list'); // 
    Blah

    I use jQuery in the code and it works well with iScroll.

提交回复
热议问题