The animation slide-in
starts in margin-top:0%; width:100%;
and ends in margin-top:300px; width:100%;
so what this animation does is to go down the text that is written.
But soon after the animation goes down and ends, it returns to margin-top:0%
. I need it to stay stable and stop at margin-top:300px
or at least, as soon as it's over, repeat the animation.
Here is the code below:
#logo-h {
animation-duration: 3s;
animation-name: slidein;
z-index: 5;
text-align: center;
}
.slidein {
-moz-animation-duration: 3s;
-webkit-animation-duration: 3s;
animation-duration: 3s;
-moz-animation-name: slidein;
-webkit-animation-name: slidein;
animation-name: slidein;
-moz-animation-iteration-count: infinite;
-webkit-animation-iteration-count: infinite;
animation-iteration-count: infinite;
-moz-animation-direction: alternate;
-webkit-animation-direction: alternate;
animation-direction: alternate;
}
@-moz-keyframes slidein {
from {
margin-top:0%;
width:100%
}
to {
margin-top:300px;
width:100%;
}
}
@-webkit-keyframes slidein {
from {
margin-top:0%;
width:100%
}
to {
margin-top:300px;
width:100%;
}
}
@-ms-keyframes slidein {
from {
margin-top:0%;
width:100%
}
to {
margin-top:300px;
width:100%;
}
}
@-o-keyframes slidein {
from {
margin-top:0%;
width:100%
}
to {
margin-top:300px;
width:100%;
}
}
@keyframes slidein {
from {
margin-top:0%;
width:100%
}
to {
margin-top:300px;
width:100%;
}
}
<div id="logo-h">teste</div>