<div class="box1">
<p>step-start</p>
</div>
<div class="box2">
<p>step-end</p>
</div>
<div class="box3">
<p>steps(5,end)</p>
</div>
div {
width: 300px;
height: 50px;
margin-bottom: 10px;
border-radius: 5px;
background-color: #e57fe7;
}
.box1 {
animation: move 3s step-start infinite;
}
.box2 {
animation: move 3s step-end infinite;
}
.box3 {
animation: move 3s steps(5,end) infinite;
}
p {
font-size: 20px;
font-weight: 900;
text-align: center;
color: white;
}
@keyframes move {
0%, 100% {
transform: translateX(0);
}
50% {
transform: translateX(100px);
}
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.