Note that there are some explanatory texts on larger screens.

plurals
  1. POCSS3 animation pause/unpause skipping & jumping in webkit
    primarykey
    data
    text
    <p>I have implemented animation pausing as described here: <a href="https://stackoverflow.com/questions/5804444/how-to-pause-and-resume-css3-animation-using-javascript">How to pause and resume CSS3 animation using JavaScript?</a></p> <p>Here is my CSS for the rotating element:</p> <pre><code>.is-rotating{ -webkit-animation: circle 55s linear infinite; -moz-animation: circle 55s linear infinite; -ms-animation: circle 55s linear infinite; animation: circle 55s linear infinite; } </code></pre> <p>I toggle a <code>is-paused</code> class to the elements in question <code>onmouseover</code>:</p> <pre><code>.is-paused{ -webkit-animation-play-state:paused; -moz-animation-play-state:paused; -o-animation-play-state:paused; animation-play-state:paused; } </code></pre> <p>When I remove this class with JS (onmouseout), the rotating animation resets to the 'origin' point. Sometimes it does, sometimes not. This happens in webkit (Chrome and Safari on OSX), works fine in FF.</p> <p>I know <code>animation-play-state</code> is an experimental feature, but <a href="https://developer.mozilla.org/en-US/docs/CSS/animation-play-state" rel="nofollow noreferrer">MDN says it should work fine in webkit</a>. Does anyone have any ideas on how to implement for webkit browsers?</p> <p><strong>UPDATE:</strong> here is the rest of the CSS:</p> <pre><code>@-webkit-keyframes circle { from { -webkit-transform:rotate(0deg); } to { -webkit-transform:rotate(360deg); } } @-webkit-keyframes inner-circle { from { -webkit-transform:rotate(0deg); } to { -webkit-transform:rotate(-360deg); } } @-moz-keyframes circle { from { -moz-transform:rotate(0deg); } to { -moz-transform:rotate(360deg); } } @-moz-keyframes inner-circle { from { -moz-transform:rotate(0deg); } to { -moz-transform:rotate(-360deg); } } @-ms-keyframes circle { from { -ms-transform:rotate(0deg); } to { -ms-transform:rotate(360deg); } } @-ms-keyframes inner-circle { from { -ms-transform:rotate(0deg); } to { -ms-transform:rotate(-360deg); } } @keyframes circle { from { transform:rotate(0deg); } to { transform:rotate(360deg); } } @keyframes inner-circle { from { transform:rotate(0deg); } to { transform:rotate(-360deg); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload