How to Animate gradient Text using pure css | Sanwebcorner

How to Animate gradient Text using pure css

This is one of the css3 trick to Animate the gradient text. This is one of the interesting concept and this will be done by using the html and css3 code. First we should give the gradient colors for the text using the following code. background: linear-gradient(to right, #FF3202 20%, #FF6E02 40%, #FF6E02 60%, #FF3202 80%); you can change the gradient color according to your choice. In this example i privided light orange and red color for gradient. Then will give the position for this gradient using the below code.background-position: 200% center; and then give the animation for the background using below code animation: shine 3s linear infinite; 

This is the process to generate the animated gradient text using css3 and html. I hope this example is very useful and also very simple to create. Here i provided the demo page, check out the demo page for this effect. And also have the code you can download and use this code for your projects.




Code for Animate gradient text using Css:

<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<title>How to Animate gradient Text using pure css</title>
<link href="https://fonts.googleapis.com/css?family=Roboto:900" rel="stylesheet">
<style>
html {
height: 100%;
}
body {
background: #333;
text-align: center;
min-height: 100%;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
font-family: 'Roboto', sans-serif;
}
h1 {
font-size: 100px;
text-transform:uppercase;
}
.linear-wipe {
text-align: center;
background: -webkit-gradient(linear, left top, right top, color-stop(20%, #FF3202), color-stop(40%, #FF6E02), color-stop(60%, #FF6E02), color-stop(80%, #FF3202));
background: linear-gradient(to right, #FF3202 20%, #FF6E02 40%, #FF6E02 60%, #FF3202 80%);
background-size: 200% auto;
color: #000;
background-clip: text;
text-fill-color: transparent;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
-webkit-animation: shine 3s linear infinite;
animation: shine 3s linear infinite;
}
@-webkit-keyframes shine {
to {
background-position: 200% center;
}
}
@keyframes shine {
to {
background-position: 200% center;
}
}
</style>
</head>
<body>
<h2>How to Animate gradient Text using pure css</h2>
<h1 class="linear-wipe">sanwebcorner</h1>
</body>
</html>