Skip to content

Instantly share code, notes, and snippets.

@oli
Created January 20, 2012 07:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save oli/1645993 to your computer and use it in GitHub Desktop.
Save oli/1645993 to your computer and use it in GitHub Desktop.
WebKit FOUC when animation-play-state:paused→running
/* WebKit FOUC when animation-play-state:paused→running */
/* that’s flash of unanimated content, or the element’s default state */
@keyframes runaway {
0% {left: 5%;}
to {left: 80%;}
}
.wrapper:hover .box {animation: runaway 2s ease-in-out infinite
alternate;}
.box:hover {animation-play-state: paused;}
.wrapper {
position: relative;
height: 100%;
padding: 100px 0 172px;
background-color: #e9e9e9;
}
.box {
position: absolute;
left: 5%;
width: 9em;
border: 5px solid #999;
border-radius: 5px;
padding: .75em;
text-align: center;
background-color: #fff;
}
<div class="wrapper">
<div class="box">hover me to pause</div>
</div>
{"version":"1.1","settings":{"prefixfree":"1"},"view":[{"template":"r\nc","active":true,"seethrough":false},{"template":"r\nh","active":false,"seethrough":false},{"template":"r\nch","active":false,"seethrough":false}]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment