html - 响应式 IFrame 以显示来自外部文档的内容

标签 html css iframe twitter-bootstrap-3

我有一个 iframe 来显示位于另一个位置的 .htm 文件的内容。该文档在桌面浏览器上完美加载。

但是在移动端,文档的内容显示不完整。

我正在为移动和桌面 View 寻找响应式 iframe。

HTML

<iframe
    id="ifrm"
    src="URL.htm"
    width="100%"
    frameborder="0"
    scrolling="no"
    height="1450px"
    style="padding-top: 0px; float: left;" target="_blank"
/>

我引用了这些链接,但不幸的是它们没有帮助:

Full-screen iframe with a height of 100%

Scale iFrame css width 100% like an image

最佳答案

Demo 在 iframe 中使用 bootstrap 网站

确保你有

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

<head>您的文档。

关于html - 响应式 IFrame 以显示来自外部文档的内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24450475/

相关文章:

php - 每行表上的 MPdf 按钮边框

html - 用百分比将 iframe 内容放入 div 中

html - 使用 Bootstrap 框架工作时如何为 div、img 等提供宽度和高度

javascript - 当我从 Pen 将它复制到 PHPStorm 时,为什么这个文本动画代码不起作用?

javascript - 如何在 ajax 成功时获取 TreeView 中的复选框计数值?

javascript - 有没有办法将 PaperProps 中的样式对象移动到 Material UI 中的 makeStyles?

angular - iPhone X ionic 3应用程序中缺少Youtube控件

javascript - 禁止在 javascript 中打开窗口

javascript - Jquery 获取 A 标签的closest() Iframe 返回未定义

javascript - 图片加载前预加载JS计算