0

我遇到了一个错误,其中 chrome 在 iframe 下方插入了最少量的额外空间。见这里http://jsfiddle.net/hrp27/。整个代码是

<div class="subwindow" style="overflow-y: auto;">
    <div id="blog" style="line-height: 0px;">
        <div class="container-fluid main-holder">
            <iframe src="http://elju.github.io" frameborder="0">
            </iframe>
        </div>
    </div>
</div>

Firefox 中不会发生同样的问题。我已经看了一段时间,不知道是什么导致了问题。我问是因为我在我的网站http://secure-shore-8758.herokuapp.com/上遇到了类似的问题。由于某种原因,Chrome 似乎会在我的代码中自动插入一个溢出-y:自动,而无需我告诉它。如果有人可以解释这种行为,那就太好了!

4

1 回答 1

0

您的“博客”元素上有一个属性“行高:0px”。删除它以修复额外的空间

或者您可以将子窗口类的溢出-y 属性更改为“无”,如下所示:

 <div class="subwindow" style="overflow-y: none;">
    <div id="blog" style="line-height: 0px;">
        <div class="container-fluid main-holder">
            <iframe src="http://elju.github.io" frameborder="0">
            </iframe>
        </div>
    </div>
</div>
于 2013-05-05T08:33:09.023 回答