打开页面时背景色的渐变效果(酷)

Posted on April 17, 2005 by Fdream

这种效果还比较酷的说,不过打开的时候有点慢(如果你打开的窗口很大的话)。

<script type="text/javascript">

function BgColor(){
    var x = 0, step = 1;
    while( x <= 0xffffff){
        document.bgColor = x;
        x += step;
        step <<= 8;
        if( step >= 0x1000000) step = 1;
    }
}

BgColor()
// ]]>
</script>

打开页面时背景色的渐变效果

分享 |
Categories:
Ajax Web
Tags:
, ,
Comments:
Leave a comment
Views:
20,579 Views

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>