非常基础的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

 

 

posted @ 2009-06-16 21:58  梦想天空(山边小溪)  阅读(1384)  评论(0编辑  收藏  举报