snipt

Ctrl+h for KB shortcuts

Text only

CSS: Flickering on animation on iOS

1
2
3
4
5
6
7
Could be fixed by:

Tips 1 - Adding -webkit-backspace-visibility: hidden to the animated element and/or its parent(s) and/or its child(ren)

Tips 2 - Adding translateZ(0) everywhere like a maniac

Tips 3 - Could be because of -webkit-scrolling-overflow ! Remove it and yey. Can't remove it ? Then remove a overflow: hidden on its parent and you should be fine.
https://snipt.net/embed/0798edb481751d69478f7c2e8bd40b5a/
https://snipt.net/raw/0798edb481751d69478f7c2e8bd40b5a/
0798edb481751d69478f7c2e8bd40b5a
text
Text only
7
2016-09-26T11:37:57
True
False
False
Apr 01, 2015 at 04:04 PM
/api/public/snipt/138822/
css-flickering-on-animation-on-ios-75944e62
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>Could be fixed by: </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a>Tips 1 - Adding -webkit-backspace-visibility: hidden to the animated element and/or its parent(s) and/or its child(ren) </span><span id="L-4"><a name="L-4"></a> </span><span id="L-5"><a name="L-5"></a>Tips 2 - Adding translateZ(0) everywhere like a maniac </span><span id="L-6"><a name="L-6"></a> </span><span id="L-7"><a name="L-7"></a>Tips 3 - Could be because of -webkit-scrolling-overflow ! Remove it and yey. Can&#39;t remove it ? Then remove a overflow: hidden on its parent and you should be fine. </span></pre></div> </td></tr></table>
animation, blink, crap, css, flicker

JavaScript

Event for CSS3 animation end

1
2
3
4
5
6
7
8
var cssAnimationEndHandlerNS = 'animationend webkitAnimationEnd oAnimationEnd MSAnimationEnd';
selector.addClass('animation');
.bind(cssAnimationEndHandlerNS, function ()
			   {
				   Sselector
					   .removeClass('animation')
					   .unbind(cssAnimationEndHandlerNS);
			   });
https://snipt.net/embed/c481849698cea326193e26684c4587cf/
https://snipt.net/raw/c481849698cea326193e26684c4587cf/
c481849698cea326193e26684c4587cf
js
JavaScript
8
2016-09-24T23:07:24
True
False
False
Apr 05, 2013 at 09:19 AM
/api/public/snipt/58826/
event-for-css3-animation-end
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a> <a href="#L-8">8</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="kd">var</span> <span class="nx">cssAnimationEndHandlerNS</span> <span class="o">=</span> <span class="s1">&#39;animationend webkitAnimationEnd oAnimationEnd MSAnimationEnd&#39;</span><span class="p">;</span> </span><span id="L-2"><a name="L-2"></a><span class="nx">selector</span><span class="p">.</span><span class="nx">addClass</span><span class="p">(</span><span class="s1">&#39;animation&#39;</span><span class="p">);</span> </span><span id="L-3"><a name="L-3"></a><span class="p">.</span><span class="nx">bind</span><span class="p">(</span><span class="nx">cssAnimationEndHandlerNS</span><span class="p">,</span> <span class="kd">function</span> <span class="p">()</span> </span><span id="L-4"><a name="L-4"></a> <span class="p">{</span> </span><span id="L-5"><a name="L-5"></a> <span class="nx">Sselector</span> </span><span id="L-6"><a name="L-6"></a> <span class="p">.</span><span class="nx">removeClass</span><span class="p">(</span><span class="s1">&#39;animation&#39;</span><span class="p">)</span> </span><span id="L-7"><a name="L-7"></a> <span class="p">.</span><span class="nx">unbind</span><span class="p">(</span><span class="nx">cssAnimationEndHandlerNS</span><span class="p">);</span> </span><span id="L-8"><a name="L-8"></a> <span class="p">});</span> </span></pre></div> </td></tr></table>
animation, css, js
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.