Home >Web Front-end >JS Tutorial >A few short sentences of jquery code to implement a picture scrolling up and switching_jquery
Introduction to animate() parameters: The
animate() method performs custom animations of CSS property sets.
This method changes an element from one state to another through CSS styles. CSS property values change gradually, allowing you to create animated effects.
Only numeric values can be animated (e.g. "margin:30px"). String values cannot be animated (such as "background-color:red").
PS: But if you reference the latest jquery ui framework, attributes such as backgroudColor and color can also implement gradients.
PS: Use "=" or "-=" to create relative animations.
First of all, you still need to reference the jquery framework, you know.
Let’s look at the code again: