Note that there are some explanatory texts on larger screens.

plurals
  1. POCSS3 transition/transform/translate3d causes severe flicker on first or last "frame" of the transition (on an iPad)
    primarykey
    data
    text
    <p>All,</p> <p>I'm working on a web app specifically for the iPad, and I'm using a CSS3 transition to animate a div (move it from left to right).</p> <p>My class looks like this:</p> <pre><code>.mover { -webkit-transition:all 0.4s ease-in-out; } </code></pre> <p>When the user clicks a button, I do this:</p> <pre><code>var s = "translate3d(" + newPosition + "px, 0, 0)"; $('.mover ').css('-webkit-transform', s); </code></pre> <p>This works great <strong>EXCEPT</strong> the <strong>FIRST</strong> time the user triggers the transition; the first time, there's a very noticeable flicker.</p> <p>I realize I don't need to use translate3d since I'm only moving the div left and right, but, as I understand it, this forces the iPad to use GPU acceleration. (Is this correct?)</p> <p>Many thanks in advance!</p> <p><strong>[UPDATE]</strong></p> <p>I was a little ambiguous about the "flicker". In short - I've been experimenting with a wide variety of CSS3 transitions (specifically on the iPad), and consistently - I've noticed a distinct flicker at the <strong>start</strong> or <strong>end</strong> of the transition.</p> <p>In other words, the transitions themselves are VERY smooth. However, depending on the precise settings, there's a noticeable flicker just before the transition begins or ends.</p> <p>Here's another example: I have three photos (PNGs) stacked on top of each other.</p> <p>The bottom PNG has opacity=1.0, the top 2 have opacity=0.0. Using -webkit-keyframes, I'm able to get silky smooth transitions as the photos fade in and out. When the animation ends, the bottom photo ends at opacity=1.0, the top two at opacity=0.0. (That should be their final state).</p> <p>However, just as the animation ends, the bottom photo flickers. It's as though the browser is forces to redraw/repaint the screen, and that takes a few fractions of a second.</p> <p>It's bad enough to spoil the effect, and render then transitions unuseable. (On my iMac it is <em>almost</em>, but not quite, imperceptible. On the iPad, it's unmissable).</p>
    singulars
    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.
 

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