Wilto / Dynamic-Carousel

A carousel plugin built for responsive layouts. There are many like it, but this one is mine.
matmarquis.com/carousel/
472 stars 112 forks source link

Feature request - Smoother transitions for iOS devices #74

Open baoagency opened 11 years ago

baoagency commented 11 years ago

When can we expect the smoother transitions between slides to be implemented?

mnapthine commented 11 years ago

Perhaps you could fix this with CSS by adding -webkit-transform: translateZ(0); It's worked a treat for me before and it might help.... The general problem is this carousel uses the margin-left property to transition on, but that doesn't have native hardware acceleration on iOS devices, translateZ tricks the browser into thinking you wanna do some crazy shizzle so enables HW acceleration. See http://www.html5rocks.com/en/tutorials/speed/html5/ for more details.

mnapthine commented 11 years ago

FYI: I can completely see why the margin-left property is being used, another option is translateX but it's percentage model is very different from margin so would require more complicated and buggy JS. I might have a go.

baoagency commented 11 years ago

On what element in the styleshet do I place: -webkit-transform: translateZ(0); ??

mnapthine commented 11 years ago

Generally on the element you are moving, just try it on the ul. Have a play around with it. As I said it might help but it might not. Post back you findings though as I'd be interested to know how you get on. Good luck!

baoagency commented 11 years ago

Well after doing some testing and putting that code on the UL, it seems you can notice the slight change in easing when swiping left to right but its still not a fluid movement unfortunately.