jquary中滚动条滚动到底部

例如:

html: <div class="box"></div>  

css: {width:100px;height:200px;overflow:hidden;} JS: $('.box').scrollTop( $('.box')[0].scrollHeight - $(this).height() );
  1. $(this).height(),//可见高度 ,可视区域高度

  2. $(this).get(0).scrollHeight,//内容高度  整个内容高度,包括hidden的部分

  3.  $(this).scrollTop();//滚动高度 滚动条距离上边的高度 = 2-1 

    scroll事件不支持冒泡;

posted on 2017-11-22 14:14  柳暗花明8963  阅读(173)  评论(0编辑  收藏  举报