【问题标题】:how to fix a height & width of div by css如何通过css修复div的高度和宽度
【发布时间】:2013-05-15 13:39:00
【问题描述】:

我想知道我是否有一个 iframe 窗口并且我在一个 Div 中打开它。但我只想在 div 中显示该 iframe 的固定区域如何使用 css。

看,

我有一个 iframe 窗口

<iframe src="http//www.examplesite.com/" height="200" width ="800"></iframe>

我需要在 div 中打开它。但我的问题是我无法更改 iframe 代码。请不要为此建议我。 我只想在 div 中显示 700 宽度和高度 175。 你可以说我只想在 div 中显示 iframe 的 3/4 部分。

这可能吗。 如果答案是肯定的,那怎么办?

【问题讨论】:

    标签: html iframe


    【解决方案1】:

    你可以试试这个

    <div style="height:175px;width:700px;overflow:hidden"><iframe src="http//www.yahoo.com/" height="200" width ="800"></iframe></div>
    

    【讨论】:

      猜你喜欢
      • 2017-04-09
      • 2019-08-25
      • 1970-01-01
      • 2021-10-02
      • 1970-01-01
      • 2014-01-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多