Edit: Others has beaten me and answered while I was typing this, but since I included a link to a documentation that nobody else mentioned I'm going to post this anyway.
You can create animations using only CSS3 with the @keyframes
rules and animation-*
properties.
See http://www.w3schools.com/css/css3_animations.asp for reference.
Here is a little snippet:
<!DOCTYPE html>
<html>
<head>
<style>
.square{
width:100px;
height:100px;
background:linear-gradient(90deg, yellow 0%, blue 0%);
border:1px solid;
animation-name: example;
animation-duration: 4s;
}
@keyframes example {
0% {background:linear-gradient(90deg, yellow 0%, blue 0%)}
25% {background:linear-gradient(90deg, yellow 25%, blue 0%)}
50% {background:linear-gradient(90deg, yellow 50%, blue 0%)}
75% {background:linear-gradient(90deg, yellow 75%, blue 0%)}
100% {background:linear-gradient(90deg, yellow 100%, blue 0%)}
}
</style>
</head>
<body>
<div class="square"></div>
</body>
</html>
Note: There is a mess regarding vendors with these properties/rules and due that I couldn't get it working (tried it on Firefox 44). And to keep it simple I used only the default sintax. I hope it can shed some light on this at least.
Edit: Possibly I couldn't get it working due the fact mentioned in comments here.