Home > Web Front-end > JS Tutorial > jquery animate image sliding sample code_jquery

jquery animate image sliding sample code_jquery

WBOY
Release: 2016-05-16 18:11:22
Original
1254 people have browsed it

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:

Copy code The code 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:
Copy code The code is as follows:



The running results are as shown in the figure:
jquery animate image sliding sample code_jquery
Online demo: http://demo.jb51.net/js/2011/jqueryanimate/index.html
Source code download: Click to download
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template