With CSS3, we could make simple animation without any use of Javascript. The following is an example which created a mouse hover effect on a div.
<!DOCTYPE html> <html> <head> <title>CSS3 - Simple transistion effect</title> <style type="text/css"> #eureka { background-color: red; width: 200px; height: 200px; -webkit-transition: background-color 0.5s ease-in-out, width 0.5s ease-in-out; -moz-transition: background-color 0.5s ease-in-out, width 0.5s ease-in-out; -o-transition: background-color 0.5s ease-in-out, width 0.5s ease-in-out; -ms-transition: background-color 0.5s ease-in-out, width 0.5s ease-in-out; transition: background-color 0.5s ease-in-out, width 0.5s ease-in-out; } #eureka:hover { background-color: blue; width: 400px; } </style> </head> <body> <div id="eureka"></div> </body> </html>