javascript - 如何使 iframe 响应

标签 javascript html css

我确实让这段代码在没有滚动条的情况下工作。并且仍然显示来自 iframe 中链接的所有内容。

   <html>
      <head>
        <title>How to make Iframe Responsive</title>
          </head>
             <body>
                <div style="padding-bottom:56.25%; position:relative; display:block; width: 100%">
              <iframe width="100%" height="100%" src="https://www.inflatableoffice.com/quotes/quoteme.php name=Starwalk+of+Dallas%2C+LLC" frameborder="0" allowfullscreen="" style="position:absolute; top:0; left: 0"></iframe>
             </div>
           </body>
      </html>

我希望它在没有侧边栏的情况下显示。

最佳答案

在 iframe 标签中添加 scrolling="no" 属性。

<iframe scrolling="no" ...></iframe>

关于javascript - 如何使 iframe 响应,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53921431/

相关文章:

javascript - 导轨 5/JavaScript : dynamically update only record attributes that have updated on page

html - 网页正在加载而 css 样式还没有准备好?

html - CSS3 移动多级菜单 : can't show the second level

css - 我的 calc() 使用 vw 和整数的组合来计算字体大小没有解决

html - CSS对齐问题

javascript - jQuery - 网格返回不均匀的行和列

javascript - 过滤 Observable 数组

javascript - 如何在 JavaScript 中编辑小部件/片段的样式

javascript - 通过Ajax将本地存储的图像发送到服务器

javascript - 具有相同类的嵌套元素上的jquery click事件