本文实例为大家分享了js公告栏上下滚动效果的具体实现代码,供大家参考,具体内容如下
公告栏上下滚动body {
background: grey;
}
ul,li{list-style: none;padding: 0;margin: 0;}
.Roll {
padding: 0;
text-align: left;
text-indent: 10px;
cursor: pointer;
opacity: 1;
height: 6rem;
line-height: 3rem;
font-size: 17px;
background-color: #fff;
color: #fe172d;
}
.ul li {
background-color: #A6E1EC;
border-radius: 20px;
height: 2rem;
margin: 50px auto;
opacity: 0;
line-height: 2rem;
}
- 11111刚刚购买了一单
- 22222刚刚购买了一单
- 33333刚刚购买了一单
- 44444刚刚购买了一单
- 55555刚刚购买了一单
- 66666刚刚购买了一单
statr = () => { //创造一个循环方法函数
let first = $('.ul li:first'), //获取列表第