Skip to content

Instantly share code, notes, and snippets.

@carlosrojaso
Created May 12, 2014 19:23
Show Gist options
  • Save carlosrojaso/74319e392b02ebd5566e to your computer and use it in GitHub Desktop.
Save carlosrojaso/74319e392b02ebd5566e to your computer and use it in GitHub Desktop.
CSS3 Animations
<!DOCTYPE html>
<html>
<head>
<style>
div
{
width:100px;
height:100px;
background:red;
-webkit-animation:myfirst 5s; /* Chrome, Safari, Opera */
animation:myfirst 5s;
}
/* Chrome, Safari, Opera */
@-webkit-keyframes myfirst
{
from {background:red;}
to {background:yellow;}
}
/* Standard syntax */
@keyframes myfirst
{
from {background:red;}
to {background:yellow;}
}
</style>
</head>
<body>
<p><b>Note:</b> This example does not work in Internet Explorer 9 and earlier versions.</p>
<div></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment