非常基础的JS动画演示

这个例子使用setTimeout实现非常简单的动画效果。

<style type="text/css">
div
{
    height
:200px;
    width
:600px;
    background-color
:#CCCCCC;
}
#test1
{
    background
:#99CC00;
    position
:fixed;
    left
:300px;
    filter
:alpha(opacity=0);
}
</style>
<div id="test1"></div>
<button onclick="doSome()">测试</button>
Code
原文地址:https://www.cnblogs.com/lhb25/p/1504621.html