Font color change css - Text animation with css

Font color change css – Text animation with css

Source codes:

<!DOCTYPE html>
<html>
<head>
<title></title>
<style type=”text/css”>
*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: sans-serif;
}
body{
  background: #000;
  color: white;
  width: 80%;
  margin: 0 auto;
  height: 100vh;
  align-items: center;
  justify-content: center;
  text-align: center;
}
h1{
text-transform: uppercase;
background-image: linear-gradient(-225deg, #231557 0%,
        #44107a 29%,
        #ff1361 67%,
        #fff800 100%
      );
background-size: auto auto;
background-clip: border-box;
background-size: 200% auto;
color: white;
background-clip: text;
text-fill-color:transparent;
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
animation: text_animation 2s linear infinite;
display: inline-block;
font-size: 80px;
margin-top: 200px;
}
@keyframes text_animation{
  to{
    background-position: 200% center;
  }
}
</style>
</head>
<body>
  <h1> Doolot </h1>
</body>
</html>
Scroll to Top