I’m moving a very long image using -webkit-transform: translate(-958px, 0); animation
The image gets cut off very soon after it starts to move horizontally, but if I slightly move the tablet screen, it redraws the screen and it displays the whole image while panning across and very smoothly too.
But how do I simulate this in code?
Some suggestion:
Back to the question:
translate3dwill get better performance, since it doesn’t work, the main bottleneck is elsewhere.from my experience with mobile webkit, when there is large image (in term of size or dimension), you may have trouble:
If your UI-triggered redraw will smooth everything, the lag may be caused by image loading & rendering
Solution:
animation-delayorsetTimeoutFor 2 & 3, the code will be like this:
good luck.