Skip to content

Instantly share code, notes, and snippets.

@luiscielak
Created February 10, 2012 02:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luiscielak/1785901 to your computer and use it in GitHub Desktop.
Save luiscielak/1785901 to your computer and use it in GitHub Desktop.
CSS Transitions
/**
* CSS Transitions
* 2012-02-05
*/
a.foo{
transition-property: background 0.3s ease 0.5s; /* property; duration; timing; delay*/
padding: 5px 10px;
background: #9c3;
}
a.foo:hover,
a.foo.focus{
color: #030;
background: #690;
}
/**
transition-property: width, opacity, position, font-size
**/
<!-- content to be placed inside <body>…</body> -->
<body>
<br><br><br>
<a href="#" class="foo"> Transition me! </a>
</body>
{"view":"split","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment