亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

停止按柳,隨時停,停所有操作

original 2018-11-21 23:59:59 162
abstrait:<!DOCTYPE html> <html> <head>     <meta charset="UTF-8">     <title>jQuery自定義動畫</title>   &nbs
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>jQuery自定義動畫</title>
    <style type="text/css">
        div{
            width: 200px;
            height: 200px;
            background: red;
            border: 5px #000;
            position: absolute;
        }
    </style>
    <script src="jquery-3.3.1.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $('.but1').click(function(){
                $('p').animate({fontSize:'40px'},1500)//屬性名稱一律改成駝峰寫法
            })

            //同時操作多個css屬性
            //使用預定義的值show hide toggle
            $('.but2').click(function(){
                $('div').animate({
                    // left:'400px',
                    // opacity:'0.3',
                    // height:'400px',
                    // width:'400px'
                    width:'toggle',
                    height:'toggle'
                },1500)
            })
            $('#stop').click(function(){
                $('div').stop()
            })
        })
    </script>
</head>
<body>
    <button class="but1">字體放大按柳</button>
    <p>jQuery中我們使用animate()方法創(chuàng)建自定義的動畫</p>
    <button class="but2">改變div按柳</button>
    <button id="stop">停止按柳</button>
    <div></div>
</body>
</html>


Professeur correcteur:韋小寶Temps de correction:2018-11-22 09:13:26
Résumé du professeur:不錯不錯!代碼很完整!下次記得再加點總結(jié)就更不錯了哦!

Notes de version

Entrées populaires