Here I just want to fill the cup by 'bear'. So I thought that I just can change background image and imitate the filling process. But how you see background runs right or left and I don't know why. If you have a solution or another better way please help me.
This is html
* {
box-sizing: border-box;
}
.container {
padding: 5em;
background: #1B3D6E;
text-align: center;
}
.load {
animation-name: loading;
animation-duration: 4s;
animation-iteration-count: infinite;
}
@keyframes loading {
0% {
}
20% {
background: url('https://i.ibb.co/7bK4D36/Vector-1.png');
background-repeat: no-repeat;
background-size: auto;
background-position: bottom;
}
50% {
background: url('https://i.ibb.co/74yw3Fh/Bar-Loader.png');
background-repeat: no-repeat;
}
70% {
background: url('https://i.ibb.co/74yw3Fh/Bar-Loader.png');
background-repeat: no-repeat;
background-size: auto;
background-position: 4px 5px;
}
90% {
background: url('https://i.ibb.co/74yw3Fh/Bar-Loader.png');
background-repeat: no-repeat;
background-size: auto;
background-position: 4px 5px;
}
100% {
background: url('https://i.ibb.co/74yw3Fh/Bar-Loader.png');
background-repeat: no-repeat;
background-size: auto;
background-position: 4px 5px;
}
}
<div class="container">
<img class="load" src="https://i.ibb.co/mbpyFZ2/Loader.png" width="48" height="90" alt="Loading...">
</div>
So to see all animation please run snipper on full page. Thanks