我有一个响应式网站:here
我的目标是将该网站嵌入到 iframe 中,并仍然保持响应能力。
我尝试过将我的网站作为示例嵌入到 JSFiddle 中:here
我的表单在手机屏幕上看起来很延伸
我的目标是实现如上图所示的效果
我已经使用了响应式知识工具箱中的所有内容。
我使用了 bootrap 网格系统( col-xs-12
)。
我还尝试将其放在 HTML 页面顶部
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
我希望有人可以填写我在这里错过的内容
最佳答案
试试这个:
html,
body {
height:100%;
margin:0;
}
iframe {
position:absolute;
top:0;
left:0;
width:100%;
height:100%;
margin:0;
border: 0;
}
<iframe src="http://45.55.92.53/"></iframe>
关于javascript - iframe 中的响应式网站,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34168332/