< html lang= "en" >
< head >
< meta charset= "UTF-8" >
< title > moveUp < / title >
< style >
@ keyframes scroll {
0% {
-webkit-transform: translateY(0px);
transform: translateY(0px);
}
20% {
-webkit-transform: translateY(0px);
transform: translateY(0px);
}
25% {
-webkit-transform: translateY(-30px);
transform: translateY(-30px);
}
45% {
-webkit-transform: translateY(-30px);
transform: translateY(-30px);
}
50% {
-webkit-transform: translateY(-60px);
transform: translateY(-60px);
}
70% {
-webkit-transform: translateY(-60px);
transform: translateY(-60px);
}
75% {
-webkit-transform: translateY(-90px);
transform: translateY(-90px);
}
95% {
-webkit-transform: translateY(-90px);
transform: translateY(-90px);
}
100% {
-webkit-transform: translateY(-120px);
transform: translateY(-120px);
}
}
div {
width: 200px;
height: 30px;
overflow: hidden;
}
ul {
height: 100%;
width: 100%;
-webkit-animation: scroll 5s infinite;
margin: 0;
padding: 0;
}
li {
line-height: 30px;
height: 30px;
}
< / style >
< / head > <
<li></li>
<li></li>
< / div >
< / body >
< / html >
these are the effects I want to achieve, but how to write this when the number of li is uncertain