A few short jquery codes implement an image scroll up switch. For more information, see. Description of the animate () parameter:
The animate () method executes the Custom Animation of the CSS property set.
This method uses the CSS style to change an element from one state to another. The CSS attribute value is gradually changed, so that you can create an animation effect.
Only numeric values can be used to create animations (such as "margin: 30px "). The string value cannot be used to create an animation (for example, "background-color: red ").
PS: however, if you reference the latest jquery ui framework, attributes such as backgroudColor and color can also achieve gradient.
PS: Use "+ =" or "-=" to create relative animations ).
First, you still need to reference the jquery framework.
Let's take a look at the Code:
The Code is as follows:
Untitled document
One
Two
Three