iframe无法在safari浏览器中运行

时间:2015-12-04 09:12:19

标签: javascript jquery html css iframe

我正在使用safari浏览器来包含iframe内容,代码如下:

 <iframe src="http://internal001.zizsoft.com/test/lookbook/test.html" style="height:800px;" />

问题是内部内容不是缩放或正确显示,

如果我尝试其他方式加载页面。例如。 jquery.load(“html”)函数里面的内容不可点击/可滚动

我在互联网上包含了一些修复代码搜索但没有运气。

$(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: 'auto',
                '-webkit-overflow-scrolling': 'touch'
            });
        });
});

以下是演示网站:

http://internal001.zizsoft.com/test/lookbook/test.html

感谢您的帮助

0 个答案:

没有答案
相关问题