每一种美,都会有一双眼睛能看到;每一份爱,总会有一颗心会感受到。

动画

1.动画

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <style>
        .box
        {
            width:200px; height:200px; background:red; position:absolute; top:0; left:0; -webkit-transition:2s all ease;
        }
            .box:hover
            {
                background:blue;
            }
    </style>
    <script>
        window.onload = function () {
            var oDiv = document.getElementById("box");
            setTimeout(function () {
                oDiv.style.left = "500px";
                oDiv.style.top = "300px";
                oDiv.style.background = "blue";
            }, 2000);
        }
    </script>
</head>
<body>
    <div class="box" id="box"></div>
</body>
</html>

 

posted @ 2013-06-26 15:26  温暖向阳Love  阅读(198)  评论(0)    收藏  举报