繁体   English   中英

如何填写剩余的股利?

[英]How to fill remaining div?

好吧,我有以下内容: http : //jsfiddle.net/a9VDa/12/

我试图使jquery树填充div“ a”的其余内容,但如果没有足够的空间,还包括滚动。

<div class="a">
    <div class="b"></div>
    <div class="c" id="tree"></div>
</div>

我建议的解决方案: http : //jsfiddle.net/Bt2sL/2/

  • 没有橙色部分滚动。

HTML

<div class="b"></div>
<div class="a">
    <div class="c" id="tree"></div>
</div>

CSS

.a {
    height: 60px;
    background-color: red;
    height: auto;
    overflow: scroll;
    height: 200px; // adjust this to your need
}

.b {
    height: 22px;
    background-color: coral;
}
.c {
    background-color: lightblue;
}

您可以固定div b并为带有溢出滚动集的a添加一些填充吗?

.a {
    height: 60px;
    background-color: gray;
    position: relative;
    overflow: scroll;
    padding-top: 22px;
}

.b {
    position: fixed;
    top: 0;
    height: 22px;
    background-color: coral;
}
.c {
    background-color: lightblue;
    height: auto;
    overflow: scroll;
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM