【发布时间】:2013-01-28 04:55:18
【问题描述】:
我想知道如何让“this”iframe/div(标有红色边框)使用所有可用高度。 iframe 距离顶部 160 像素,我希望它到底部。当我将高度设置为 100% 时,它会填满所有内容,但是当我使网页不那么高时,它会很晚才显示滚动条。这是因为他距离顶部 160 像素...有人知道如何解决这个问题吗?
php:
<div id="sidebar" style="display: none;">
<div class="sidebar p1"><a onclick="toggle_visibility('sidebar');"><i class="icon-arrow-left-3 fg-color-white"></i></a></div>
<div class="sidebar p2">settings</div>
<div class="sidebar p3">change theme color:</div>
<iframe id="data" src="/test/coredata/sidebar/theme_data.php"/>
</div>
css:
#sidebar{
width: 315px; height: 100%;
position: fixed; right: 0px;
top: 0px; background: #004d5f;
}
#data{width:310px; height:300px; position:absolute; top: 160px; left: 0px; border:3px solid #FF0000;}
屏幕: http://puu.sh/21vAz(在 url 中由于 10 个代表...)
【问题讨论】:
-
首先看起来不应该在 iframe 中
-
那么你会怎么做呢?当您提取更多数据时,它需要滚动。
-
可以滚动一个div,只需要设置overflow