I want to have a page that run the linear gradient background animation when page load
So it will start from this
then slowly animate to this and stop
however my animation didnt end as I expect , it fly away at the end
Below is what I try so far
body,
html {
margin: 0;
padding: 0;
}
.login-bg {
min-height: 100vh;
animation: Animation;
background: linear-gradient(106deg, #313131 50%, white 50.1%);
animation-duration: 3s;
animation-iteration-count: 1;
animation-timing-function: ease-in-out;
background-size: 200% 200%;
}
@keyframes Animation {
0% {
background-position: 0% 50%
}
50% {
background-position: 100% 50%
}
100% {
background-position: 50% 0%
}
}
#wrapper {
display: flex;
}
#left {
flex: 0 0 65%;
color: white;
margin-left: 10%;
margin-top: 20%;
}
#right {
flex: 1;
margin-right: 20%;
margin-top: 20%;
}
<div class="login-bg">
<div id="wrapper">
<div id="left">Left side div</div>
<div id="right">Right side div</div>
</div>
</div>