如何获得元素的滚动高度?

时间:2013-10-26 08:22:08

标签: javascript jquery html scroll

我希望获得所有带有样式溢出的elemet的滚动高度:滚动 我有下一个代码:

    <div class="team_comments">
<div class="col span_9">
<div id="timelineBoxContainer">
<ul id="timeline" class="clearfix">
<li>
<li>
<li style="display:none;">
<li style="display:none;">
<li style="display:none;">
</ul>
</div>
</div>
</div>

    .team_comments {
    height: 310px;
    overflow-x: hidden;
    overflow-y: scroll;
}

    #timeline:before {
    background: none repeat scroll 0 0 #8E9399;
    bottom: 0;
    content: "";
    height: 99999px;
    left: 50%;
    margin-left: -1px;
    margin-top: -10px;
    position: absolute;
    top: 10px;
    width: 2px;
}
.clearfix:before, .clearfix:after {
    content: "";
    display: table;
}
.clearfix:after {
    clear: both;
}
.clearfix:before, .clearfix:after {
    content: "";
    display: table;
}
#timeline {
    list-style: none outside none;
    margin: 0 auto;
    overflow: hidden;
    padding: 0 0 40px;
    position: relative;
    width: 100%;
}

如何在.team_comments中获得滚动条的高度? (不是现在的位置!!!)?我认为滚动条geight在结束时必须与滚动顶部的位置相等。 感谢

0 个答案:

没有答案