javascript - How can I make css3 transitions on height (and other dimensions) smoother on the iPhone? -


i'n trying create simple slide panel slides in bottom of screen , covers viewport. i'm loading content panel via ajax.

i'm setting panel element height:0 , absolutely positioning @ bottom of viewport , css3 transitions applied to, i'm setting height height of viewport triggering animation.

unfortunately, animation slow , laggy point it's pretty unacceptable.

i'm applying following css panel:

-webkit-transition-duration: 0.3s; -webkit-transition-timing-function: ease-in-out; -webkit-transition-property: height; 

the amount of content seems have affect. or maybe it's type of content? i'm not sure. don't think ajax having causing problem although wrong.

any ideas?

cheers.

the sluggishness surely has fact browser has re-wrap text in order accomodate new height. try animating position or translate, not height.

here quick prototype: http://jsfiddle.net/6gdgr/

you might encounter flickering slide problem, find answer in stackoverflow easily, involves either 1. placing backface visibility hidden or 2. using -webkit-translate3d, depending on context.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -