滚动条

1 如何设置

  在style里添加overflow:auto/scroll;height;weight

  如果是水平的overflow-x

2 scrollTop与scrollHeight 来实现列表循环

scrollTop  

scrollHeight  

  

  function  ScrollUp(){
        if( box.scrollTop>=con1.scrollHeight){
            box.scrollTop=0;
        }else
           box.scrollTop++;
    }

  

posted @ 2018-04-07 18:24  后小白  阅读(91)  评论(0编辑  收藏  举报