Skip to content

Instantly share code, notes, and snippets.

@oli
Created January 22, 2012 14:53
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 oli/1657290 to your computer and use it in GitHub Desktop.
Save oli/1657290 to your computer and use it in GitHub Desktop.
Animation without 0% or 100% keyframes
/* Animation without 0% or 100% keyframes */
/* @estellevw sez this can sometimes be buggy */
/* ref: https://twitter.com/estellevw/status/40528526541066240 */
@keyframes middling {50% {background-color: #777;}}
div {
width: 144px;
height: 48px;
margin: 24px;
border: 5px solid #999;
border-radius: 5px;
padding: 3px;
}
div:hover {animation: middling 3s;}
<h1>Animation with no 0% or 100% keyframes</h1>
<div>hover me</div>
<p>Works as expected in Chrome 16, Safari 5.1.2, Firefox 9</p>
{"view":"split","fontsize":"90","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment