The seedlings in the picture have three growth states. Use the countdown method to dynamically change the src in the img tag.
It performs well on Android. On iOS, it counts once and the seedlings flash once.
I don’t know the reason. Can I ask for a solution?
js is written like this (very scumbag, don’t spray~)
First, preload the image
Just change the src attribute of the image every time to reduce unnecessary rearrangements
Combine the picture into a Sprite picture and modify the display coordinates of the picture
Image preloading is the key