快捷导航

为什么要两个ul,其中的scrollUp函数能给讲解一下吗?

循环滚动                            *{margin:0;padding:0;}            ul,li{list-style:none;display:block;}            #scrollBox{height:150px;width:300px;margin:100px auto;background:#f09;overflow:hidden;}            #scrollBox #con1,#con2{width:280px;float:left;}            #scrollBox li{height:15px;line-height:15px;text-align:center;}                                 
                
  • 李华 中了10块钱

  • Leo 中了一个手机

  • 刘明 中了一块毛巾

  • ll 中了保温杯

  • nice 中了100块钱红包

  • 108 中了20元优惠券

  • ok 中了100块钱           

免责声明:本内容仅代表回答者见解不代表本站观点,请谨慎对待。

版权声明:作者保留权利,不代表本站立场。

回复

使用道具 举报

参与会员2

这个是滚动函数啊 ,意思是说这个li里面内容向上无缝滚动, 2个ul 就是为了第一个ul滚动完后第二个ul接着滚动(这里第二个ul就是复制第一个ul),大白话讲就是 第二个ul复制第一个ul的作用
回复

使用道具 举报

那为什么要if(area.scrollTop>=con1.offsetHeight){
area.scrollTop=0;
回复

使用道具 举报

可能感兴趣的问答

发新帖
  • 微信访问
  • 手机APP