久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

iOS上滾動iframe解決了,但是iframe頁面顯示不完整

Scrolling iframe on iOS is solved, BUT the iframe page display incomplete(iOS上滾動iframe解決了,但是iframe頁面顯示不完整)
本文介紹了iOS上滾動iframe解決了,但是iframe頁面顯示不完整的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我正在嘗試在iOS上滾動一個iframe,我成功了,它滾動得很好,參考:

自動使用 iOS 原生滾動,在其他平臺上你會激活 nicescroll.

我在裝有 iOS 5.1 的 iPad 上進行了測試.

I am trying to scroll an iframe on iOS, and I succeeded, it's scrolling well, reference:

http://home.jejaju.com/play/iframe-scroll.html

http://areaaperta.com/nicescroll/demo.html

BUT, all solutions have an issue: the iframe page is not completely displayed...

I tested on my iphone and ipad, the iframe page displays choppy.

any idea?

Example:

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=9;FF=3;chrome=1;OtherUA=4" />
    <meta name="viewport" content="width=device-width, user-scalable=no" />
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.8.1.js"></script>
    <script type="text/javascript">
    $(function(){
        if (/iPhone|iPod|iPad/.test(navigator.userAgent))
            $('iframe').wrap(function(){
                var $this = $(this);
                return $('<div />').css({
                    width: $this.attr('width'),
                    height: $this.attr('height'),
                    overflow: 'scroll',
                    '-webkit-overflow-scrolling': 'touch'
                });
            });
    })
    </script>
    <title>Untitled</title>
</head>
<body>
stuff
<div>
<iframe src="iframe-scroll-long.html" height="500" width="500"></iframe>
</div>
more stuff
</body>
</html>

解決方案

I found a combination of div with "absolute" style and nicescroll do fix choppines.

You have to load nicescroll on the page loaded by iframe. In the same page wrap all you content with a div (with style absolute)

  #content {   position:absolute; }

Load nicescroll using wrapped div content.

  $(document).ready(function() {
    $("html").niceScroll("#content"); 
  });

Link to demo page, so you can check the code: http://areaaperta.com/nicescroll/demo/iframe6.html

Automatically, with iOS native scroll has used, in other platform you got nicescroll active.

I have test on iPad with iOS 5.1.

這篇關于iOS上滾動iframe解決了,但是iframe頁面顯示不完整的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Issues Setting Value/Label Using DropKick Javascript(使用 DropKick Javascript 設置值/標簽的問題)
stellar.js - configuring offsets / aligning elements for a vertical scrolling website?(stellar.js - 為垂直滾動網站配置偏移量/對齊元素?)
Updating table with Dynatable plugin(使用 Dynatable 插件更新表)
jQuery tooltip add line break(jQuery 工具提示添加換行符)
Why is the lightbox jQuery plugin not working for me?(為什么燈箱 jQuery 插件對我不起作用?)
Alternative to Javascript prompt box for younger users(為年輕用戶替代 Javascript 提示框)
主站蜘蛛池模板: 亚洲国产一区二区视频 | 中文字幕日韩欧美 | 国产视频第一页 | 色播久久久 | 国产精品久久久久久久久污网站 | 日韩成人一区 | 51ⅴ精品国产91久久久久久 | 国产主播第一页 | 欧美电影一区 | 国产专区在线 | 秋霞精品 | 粉色午夜视频 | 综合天天久久 | 欧美在线观看一区 | 中文字幕一区二区三区四区五区 | 国产精品99久久久久久久久久久久 | 黄色网址在线播放 | 影音先锋中文字幕在线观看 | 精品亚洲一区二区三区四区五区 | 日本午夜网 | 亚洲欧美中文日韩在线v日本 | 免费色网址 | 国产美女一区二区 | 91 视频网站 | 犬夜叉在线观看 | 欧美亚洲高清 | 亚洲免费在线 | 中文字幕亚洲区一区二 | 欧美精品二区三区 | 国产综合在线视频 | 欧美一区不卡 | 成人在线视频一区 | 国家一级黄色片 | 伊人网伊人网 | 亚洲国产精品美女 | 成人av观看 | 亚洲精品4 | 欧美色影院| av网站观看 | 亚洲免费在线播放 | 欧美网站一区 |