zoukankan      html  css  js  c++  java
  • [ jquery选择器 :animated ] 此选择器匹配所有正在执行动画效果的元素

    此选择器匹配所有正在执行动画效果的元素
    实例:
    <!DOCTYPE html>
    <html lang='zh-cn'>
    <head>
    <title>Insert you title</title>
    <meta http-equiv='description' content='this is my page'>
    <meta http-equiv='keywords' content='keyword1,keyword2,keyword3'>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <script type='text/javascript' src='./js/jquery-3.0.0.js'></script>
    <style type='text/css'>
    div {
         100px; height: 100px; background: red; position: absolute;
    }
    
    #animat+div {
        top: 150px;
    }
    
    .focused {
        font: 400 13px/100px 'Courier New'; color: #FFF; text-align: center;
    }
    </style>
    <script type='text/javascript'>
        $(function(){
            setInterval(animat,1000);
            function animat(){
               $('#animat').animate({'left': 500}, 1000,function(){
                    if($(this).get(0).offsetLeft >=500)
                         $(this).get(0).style.left = '9px';
                });
             }
            animat(); //只有通过jQuery中"animat"动画函数执行的才有效果
            $("div:animated").addClass('focused');
        });
    </script>
    </head>
    <body>
        <div id='animat'>animat</div>
        <div id='no-animat'>no-animat</div>
    </body>
    </html>
  • 相关阅读:
    webrtc 手机端视频旋转
    gstreamer 命令行一些demo
    git一些命令记录
    libnice的问题记录
    webrtc ice 协商一些记录
    linux 挂在windows目录
    leetcode Permutation Sequence
    gstreamer 接收rtsp存储为h264
    uva 10285
    AndroidStudio VS Eclipse快捷键
  • 原文地址:https://www.cnblogs.com/mysearchblog/p/5605221.html
Copyright © 2011-2022 走看看