To create an engaging visual effect on your website, consider utilizing CSS3 animations in modern web browsers. An example of this is changing the color of a button from grey to blue and then yellow for added flair.
Check out this demonstration for more insight - jsFiddle
HTML
<div class="button"></div>
CSS
.button {
width: 150px;
height: 50px;
background-color: #e3e3e3;
border: 1px solid #000000;
}
.button:hover {
-webkit-animation: color 1.0s forwards;
-moz-animation: color 1.0s forwards;
-o-animation: color 1.0s forwards;
}
@-webkit-keyframes color {
0% { background-color: #0000ff; }
50% { background-color: #0000ff; }
100% { background-color: #ffff00; }
}
@-moz-keyframes color {
0% { background-color: #0000ff; }
50% { background-color: #0000ff; }
100% { background-color: #ffff00; }
}
@-o-keyframes color {
0% { background-color: #0000ff; }
50% { background-color: #0000ff; }
100% { background-color: #ffff00; }
}