I have a div with a specific width and height. And a smaller image with the same width but much less height. How could I
- Position the small image to the inside top of the big div (but still all the small image to be visible in it)
- Animate the small image from the inside top of the big div to the inside bottom (and again, still keep it all visible)
- Inverse the process to go to the top again
I 've been totally confused with this one. All widths/heights are known, so they don't need to be calculated dynamically.
Thank you.
You can see an example of the code here
In general look at the .animate()
method of jQuery.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.