Rolling arrow animation
by jonahe
HTML
<div class="down-arrow">
</div>
CSS
body {
background: teal;
}
.down-arrow {
box-sizing: border-box;
margin: 4px;
border: 3px solid black;
border-radius: 50px;
height: 100px;
width: 100px;
background-size: 90%;
background-repeat: no-repeat;
background-position-x: 4px;
background-position-y: 4px;
background-image: url("https://www.svgrepo.com/show/152162/down-arrow-direction.svg");
animation: rollingLoop 4s infinite ease-in;
background-color: white;
margin-left: auto;
}
@keyframes rollingLoop {
0% {
background-position-y: -90px;
}
20% {
background-position-y: 4px;
}
80% {
background-position-y: 4px;
}
100% {
background-position-y: 90px;
}
}