iframe中嵌入的响应式页面无法正确呈现

时间:2014-11-21 11:02:54

标签: css css3 responsive-design

主页面嵌入了使用JQUERY SUPERSLIDES插件开发的响应式移动页面。如果使用safari直接在IPHONE上加载移动页面,则该页面看起来很好。但是,当它嵌入到iframe时,它不会在IPHONE上呈现(正如您从下面的第二个屏幕截图中看到的,只有部分图像可见)。

main.html中

    <iframe id="ifrmadcontainer" seamless="seamless" scrolling="no" frameborder="0"     style="width:100%;height:100%;" src="touch.html">
    </iframe>

touch.html位于http://jsfiddle.net/w1vcrLy8/

它在Desktop Safari和Chrome上的外观:

enter image description here

它在IPhone Safari中的外观:

enter image description here

1 个答案:

答案 0 :(得分:0)

元设备是否存在于iframe内部和嵌入它的页面之外?

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />