I’m trying to do fill color effect on text but it doesn’t work , the animation doesn’t apply on third line
how can I solve this?
.text-container p {
-webkit-text-stroke : 0.5px #725c55;
color : transparent;
background-image : linear-gradient(#725c55, #725c55);
background-repeat : no-repeat;
-webkit-background-clip : text;
/* animation : backcolor 5s linear; */
background-position : 700px 0;
}
@keyframes backcolor {
100% { background-position : 0 0; }
}
.text-container p:nth-child(1) {
animation : backcolor 5s linear;
animation-delay : 5s;
}
.text-container p:nth-child(2) {
animation : backcolor 5s linear;
animation-delay : 1s;
}
.text-container p:nth-child(3) {
animation : backcolor 5s linear;
animation-delay : 5s;
}
<div class="text-container">
<p>First line in essay</p>
<p>Second line in essay</p>
<p>Third line in essay</p>
</div>
2
Answers
Try this to decrease the delay:
Apparently, your code works fine with animations, maybe you should unify the animation delay for the three texts and decrease the wait a little: