I was trying to make a multiple texts changing color animation, like this https://vercel.com. I've nailed down how to make one text change color through keyframes but I can't get them to each text change color on a certain pattern.
For instance enter image description here, you have the word Develop in color red, then it should turn to black and change to the word Preview on blue, and then this would turn to black and the word Ship should turn yellow. And finally this should iterate infinitely.
Here I leave the current code in case it helps:
.center {
margin: 0 auto;
padding-top: 10rem;
}
.awesome {
width: 100%;
margin: 0 auto;
text-align: center;
color: #313131;
font-size: 45px;
font-weight: bold;
position: flex;
-webkit-animation: color-change-red 10s infinite alternate;
-moz-animation: color-change-red 10s infinite alternate;
-o-animation: color-change-red 10s infinite alternate;
-ms-animation: color-change-red 10s infinite alternate;
animation: color-change-red 10s infinite alternate;
}
@-webkit-keyframes color-change-red {
0% { color: red; }
33.3% { color: black; }
100% { color: black; }
}
@-moz-keyframes color-change-red {
0% { color: red; }
33.3% { color: black; }
100% { color: black; }
}
@-ms-keyframes color-change-red {
0% { color: red; }
33.3% { color: black; }
100% { color: black; }
}
@-o-keyframes color-change-red {
0% { color: red; }
33.3% { color: black; }
100% { color: black; }
}
@keyframes color-change-red {
0% { color: red; }
33.3% { color: black; }
100% { color: black; }
}
.awesome2 {
width: 100%;
margin: 0 auto;
text-align: center;
color: #313131;
font-size: 45px;
font-weight: bold;
position: flex;
-webkit-animation: color-change-blue 10s infinite alternate;
-moz-animation: color-change-blue 10s infinite alternate;
-o-animation: color-change-blue 10s infinite alternate;
-ms-animation: color-change-blue 10s infinite alternate;
animation: color-change-blue 10s infinite alternate;
}
@-webkit-keyframes color-change-blue {
0% { color: black; }
33.3% { color: blue; }
66.6% { color: black; }
}
@-moz-keyframes color-change-blue {
0% { color: black; }
33.3% { color: blue; }
66.6% { color: black; }
}
@-ms-keyframes color-change-blue {
0% { color: black; }
33.3% { color: blue; }
66.6% { color: black; }
}
@-o-keyframes color-change-blue {
0% { color: black; }
33.3% { color: blue; }
66.6% { color: black; }
}
@keyframes color-change-blue {
0% { color: black; }
33.3% { color: blue; }
66.6% { color: black; }
}
.awesome3 {
width: 100%;
margin: 0 auto;
text-align: center;
color: #313131;
font-size: 45px;
font-weight: bold;
position: flex;
-webkit-animation: color-change-yellow 10s infinite alternate;
-moz-animation: color-change-yellow 10s infinite alternate;
-o-animation: color-change-yellow 10s infinite alternate;
-ms-animation: color-change-yellow 10s infinite alternate;
animation: color-change-yellow 10s infinite alternate;
}
@-webkit-keyframes color-change-yellow {
0% { color: black; }
66.6% { color: yellow; }
100% { color: black; }
}
@-moz-keyframes color-change-yellow {
0% { color: black; }
66.6% { color: yellow; }
100% { color: black; }
}
@-ms-keyframes color-change-yellow {
0% { color: black; }
66.6% { color: yellow; }
100% { color: black; }
}
@-o-keyframes color-change-yellow {
0% { color: black; }
66.6% { color: yellow; }
100% { color: black; }
}
@keyframes color-change-yellow {
0% { color: black; }
66.6% { color: yellow; }
100% { color: black; }
}
<div class='center'>
<p class="awesome">Develop</p>
<p class="awesome2">Preview</p>
<p class="awesome3">Ship</p>
</div>
text-strokeand using alinear-gradientbackground.