Each property in this object represents a style property that can change (such as "height", "top", or "opacity"). Note: All specified attributes must be in camel form, such as marginLeft instead of margin-left. The value of each attribute indicates the extent to which the animation ends for this style attribute. If it is a numeric value, the style property will gradient from the current value to the specified value. If a string value such as "hide", "show", or "toggle" is used, the default animation form is invoked for the property.
The function declaration is as follows:
animate(params[, duration[, easing[, callback]]])
In jQuery, you can use em and % units. Additionally, you can make elements move relative to each other by specifying " =" or "-=" in front of the attribute value.
The following demonstrates an example of sliding the image list left and right. The main code is as follows:
The running results are as shown in the figure:
Online demo:
http://demo.jb51.net/js/2011/jqueryanimate/index.htmlSource code download:
Click to download Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn