【问题标题】:I can't change the iframe dimensions in Internet Explorer 9我无法更改 Internet Explorer 9 中的 iframe 尺寸
【发布时间】:2013-02-01 01:42:34
【问题描述】:

http://www.chungstudio.com/the_city_stars/#blog

我在 iframe 中有一个 tumblr 博客,该博客通常出现在 firefox、chrome、safari 甚至 Internet Explorer 10 中,但在 Internet Explorer 9 中,我无法更改 iframe 的尺寸。

在 ie9 中是否有 iframe 的替代标记?

【问题讨论】:

    标签: iframe internet-explorer-9


    【解决方案1】:

    我看到您正在使用 css 将其设置为 100%; 不同浏览器对 CSS 的解释不同 - 尝试使用 CSS 重置或删除填充/边距。

    在 main.css 中:

    .blog iframe {
      width: 100%;
      height: 100%;
    }
    

    尝试添加行:

    margin: 0px;
    padding: 0px;
    

    (或将它们设置为您喜欢的间距)。如果您定义您希望它们具有的行为而不是依赖默认值,浏览器会更好地适应规则。

    我尽量不过度关注跨浏览器的 CSS 统一性;人们出于不同的原因选择浏览器 - 其中之一就是它如何解释默认值。

    当然,如果你不想要 100%……这些是要修改的行。

    【讨论】:

      猜你喜欢
      • 2012-08-19
      • 1970-01-01
      • 2010-12-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-01-26
      • 2011-09-11
      • 2015-05-21
      相关资源
      最近更新 更多