jQuery CSS排队

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
     <style>
        #pale {
            width:150px;
            height:150px;
            position:relative;
            background-color:aqua;
            border:2px solid blue;
        }
    </style>
	<meta charset="utf-8" />
    <script src="../Scripts/jquery-1.11.3.js"></script>
    <script>
        $(function () {
            //透明度:为0.5
            $("#pale").css("opacity", "0.5");
            //id为pale的div的click事件
            $("#pale").click(function () {
                //先向右并便高到达位置后向下变宽渐渐淡化
                $(this).animate({ left: "500px", height: "300px" }, 1000).animate({
                    top: "300px", width: "300px"
                }, 1000 ,function(){$(this).css({ "border": "5px solid red" })
                   }).fadeOut(1000).s
            });
        });
    </script>
</head>
<body>
    <div id="pale"></div>
</body>


猜你喜欢

转载自blog.csdn.net/mogul1/article/details/80963157