Home > Web Front-end > JS Tutorial > body text

Practical JQuery queue animation demo

一个新手
Release: 2017-09-09 10:52:50
Original
1124 people have browsed it

Not much to say, just post the code

<!-- css -->ul{
    list-style: none;   
}
li{
    font-size: 25px;
    float: left;
    color:grey;
    position: relative;
    margin: 10px;
    opacity: 0;
    left: -200px;
}<!-- html --><ul>
    <li>欢</li><li>迎</li><li>来</li><li>到</li><li>这</li><li>里</li></ul><!-- js -->$("li").last().animate({
            opacity: &#39;1&#39;,
            left: &#39;200px&#39;
        },400,function fn(){
            $(this).prev().animate({
                opacity: &#39;1&#39;,
                left: &#39;200px&#39;
            },400,fn)
        })
        setTimeout(function(){
            $("li").last().animate({
                opacity: &#39;0&#39;,
                left: &#39;400px&#39;
            },400,function fn(){
                $(this).prev().animate({
                    opacity: &#39;0&#39;,
                    left: &#39;400px&#39;
                },400,fn)
            })
        },2500)
Copy after login

Rendering:
Practical JQuery queue animation demo

The above is the detailed content of Practical JQuery queue animation demo. For more information, please follow other related articles on the PHP Chinese website!

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!