javascript - Slow CSS3 transitions on Android 4.4 vs iOS -



javascript - Slow CSS3 transitions on Android 4.4 vs iOS -

i using keyframe based css3 animations slide between divs bezier curve of (.10,.70,.10,1) duration of 400 ms

performance on android (tested on htc 1 m8 , s4 using both native 4.4 web view , blink based crosswalk) extremely janky , stuttery poor frame rate. performance on ios 4s through 5s perfect near native performance.

can please explain might cause , suggestions on how right it, require using javascript based animation solution velocityjs?

apologies if question touch vague dont think adding reams of css keyframe rules question help omitting it.

here stripped downwards illustration demonstrates talking

http://jsfiddle.net/hu69h/

(works fine on desktop not , bar ios not performant on mobile @ all)

here snippet of code logical portion of sliding:

var $ = function (id) { "use strict"; homecoming document.getelementbyid(id); }, slideopts = { sl: ['slin', 'slout'], sr: ['srin', 'srout'], popin: ['popin', 'noanim'], popout: ['noanim', 'popout'], noanim: ['noanim', 'noanim'] }, function slide(slidetype, vin, vout, callback) { var vin = $(vin), vout = $(vout), onanimationend = function () { vout.classlist.add('hidden'); vin.classlist.remove(slideopts[slidetype][0]); vout.classlist.remove(slideopts[slidetype][1]); vout.removeeventlistener('webkitanimationend', onanimationend, false); vout.removeeventlistener('animationend', onanimationend); }; if (slidetype == 'noanim'){ vin.classlist.remove('hidden'); vout.classlist.add('hidden'); } else { vout.addeventlistener('webkitanimationend', onanimationend, false); vout.addeventlistener('animationend', onanimationend); if (callback && typeof (callback) === 'function') { callback(); } vin.classlist.remove('hidden'); vin.classlist.add(slideopts[slidetype][0]); vout.classlist.add(slideopts[slidetype][1]); }

do have sample case reproduce this? help lot identify root cause..

javascript android ios css css3

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -