当高度为100%时,为什么iframe会延伸到页面末尾?

问题描述

| 我的div网站上有一个iframe。我已经将高度都设置为100%,我也在使用蓝图框架,因此该类的值为“ 0”。我的问题是为什么网站上仍然有滚动条? 码:
<div id=\"friend_pane\" style=\"background-color: #FF0000;height: 100%;\" class=\"span-12 last\">
<iframe id=\"friendpane_area\" style=\"width: 515px; height: 100%\" src=\"http://friendsconnect.org/friendpane/shell.PHP\" frameborder=\"0\" allowTransparency=\"true\"></iframe>
</div>
它不仅超出范围,还超出页面底部并具有滚动条。为什么要假定这个高度? 快照: DIV中的iFrame用红色标记。     

解决方法

        您可以尝试以下几种方法,请先确定
html { height: 100% }
,然后再确定
iframe { overflow:hidden; }
要么
<iframe id=\"friendpane_area\" style=\"width: 515px; height: 100%; overflow: hidden\" scrolling=\"no\" src=\"http://friendsconnect.org/friendpane/shell.php\" frameborder=\"0\" allowTransparency=\"true\"></iframe>
    

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...