有没有类似的demo供参考,每次只显示一条!
有什么方法可以让第三条显示完成后再继续滑动显示第一条么,而不是直接又到第一条!
css
*,p,ul,li{
padding:0;
margin:0;
}
.content{
position: relative;
background-color: red;
height:40px;
width:300px;
margin:0 auto;
}
ul{
height:40px;
/*overflow: hidden;*/
position: absolute;
top:0;
}
li{
height:40px;
line-height: 40px;
list-style: none;
}
html
- test1
- test2
- test3
JS
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
在
.content中加入overflow:hidden试试那这样啊,到第三条之后,复制前三条都第三条后边嘛,每次到第三条都复制一下,然后删掉前边的三条