Para crear un efecto de texto de color animado utilizaremos un fondo degradado y por medio de las animaciones lo moveremos de posición lo que creara un efecto muy genial., he aquí el código:
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Code House - Let’s Code! by Raymundo Pizano</title>
<style>
body {
display: grid;
place-content: center;
height: 100vh;
background: #212121;
}
.container {
width: 770px;
height: 100px;
text-align: center;
}
h1 {
font-size: 50px;
}
.txtanim {
background-image: linear-gradient( 179.7deg, rgba(249,21,215,1) 1.1%, rgb(42, 9, 160) 99% );
background-clip: text;
color: transparent;
animation: txtanim 15s linear infinite;
background-size: 200% 200%;
}
@keyframes txtanim {
0% {
background-position: 0% 0%;
}
50% {
background-position: 100% 100%;
}
100% {
background-position: 0% 0%;
}
}
</style>
</head>
<body>
<div class="container">
<h1 class="txtanim">Let’s Code! by Raymundo Pizano</h1>
</div>
</body>
</html>
Y así se vera: