National Day webpage background code-home page background code

Source: Internet
Author: User
Tags cos sin

 

  1. <Style type = "text/css">
  2. <! --
  3. Body {
  4. Margin-left: 0px;
  5. Margin-top: 59px;
  6. Margin-right: 0px;
  7. Margin-bottom: 0px;
  8. Background: url (http://www.kanxinyi.com/images/shanghai/zg60.jpg) no-repeat center top;
  9. }
  10. Body, td, th {
  11. Font-size: 12px;
  12. }
  13. . Style1 {color: # FFFFFF}
  14. . STYLE2 {color: #666666; font-size: 12px ;}
  15. . A1: link {color: # ffffff; TEXT-DECORATION: none}
  16. . A1: hover {color: # ffffff; TEXT-DECORATION: underline}
  17. . A1: visited {color: # ffffff; TEXT-DECORATION: none}
  18. . A2: link {color: #000000; TEXT-DECORATION: none}
  19. . A2: hover {color: # CC3333; TEXT-DECORATION: none}
  20. . A2: visited {color: #000000; TEXT-DECORATION: none}
  21. . A3: link {color: #666666; TEXT-DECORATION: none}
  22. . A3: hover {color: #666666; TEXT-DECORATION: underline}
  23. . A3: visited {color: #666666; TEXT-DECORATION: none}
  24. # ScrollWrap {
  25. Width: 400px;
  26. Height: 18px;
  27. Overflow: hidden;
  28. }
  29. # ScrollMsg {
  30. Float: left;
  31. Text-align: left;
  32. Padding: 0 0px;
  33. }
  34. # ScrollMsg ul {
  35. Margin: 0;
  36. Padding: 0;
  37. }
  38. # ScrollMsg li {
  39. Font-size: 12px;
  40. Color: # FFFFFF;
  41. Line-height: 18px;
  42. List-style: none;
  43. }
  44. . TabHZ ul {padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; list-style-type: none; height: 21px; line-height: 18px; background: url (images/09sy_new_dian.gif) repeat-x left bottom ;}
  45. . TabHZ ul a,. TabHZ ul a: visited {text-decoration: none ;}
  46. . TabHZ li {float: left; padding: 3px 15px 3px; background: #939192; border: 1px solid # D3D3D3; border-bottom: none ;}
  47. . TabHZ li. cur {padding: 3px 15px 3px; background: # BF0005 ;}
  48. . TabHZ li. cur a {text-decoration: none ;}
  49. . TabHZ1 ul {padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; list-style-type: none; height: 21px; line-height: 18px; background: url (images/09sy_new_dian.gif) repeat-x left bottom ;}
  50. . TabHZ1 ul a,. TabHZ1 ul a: visited {color: # ffffff; text-decoration: none ;}
  51. . TabHZ1 li {float: left; margin-left: 1px; padding: 1px 5px 0; background: #939192; border: 1px solid # D3D3D3; border-bottom: none ;}
  52. . TabHZ1 li. cur {padding-bottom: 1px; background: # BF0005 ;}
  53. . TabHZ1 li. cur a {text-decoration: none ;}
  54. . Input {
  55. Background-color: # FFFFFF;
  56. Border: 1px # dcdcdc solid;
  57. Font-size: 12px;
  58. }
  59. . STYLE4 {color: #333333}
  60. . STYLE5 {
  61. Font-size: 12px;
  62. Font-weight: bold;
  63. }
  64. . Style11 {font-size: 12px}
  65. . Layer2 {
  66. Position: absolute;
  67. Width: 457px;
  68. Height: 48px;
  69. Z-index: 1;
  70. Left: 292px;
  71. Top: 25px;
  72. }
  73. -->
  74. </Style>
  75. Effect Image.
  76. North scene code 2 on the National Day web page.
  77. <Script language = "JavaScript">
    Var Color = new Array (9 );
    Color [1] = "ff ";
    Color [2] = "ee ";
    Color [3] = "dd ";
    Color [4] = "cc ";
    Color [5] = "bb ";
    Color [6] = "aa ";
    Color [7] = "99 ";
    Color [8] = "88 ";
    Color [9] = "77 ";
    Color [10] = "66 ";
    Color [11] = "55 ";
    Color [12] = "44 ";
    Color [13] = "33 ";
    Color [14] = "22 ";
    Color [15] = "11 ";
    Color [16] = "00 ";
    Function fadeIn (where ){
    If (where> = 1 ){
    Document. bgColor = "#" + Color [where] + "0000 ";
    Where-= 1;
    SetTimeout ("fadeIn (" + where + ")", 15 );
    } Else {
    SetTimeout ('fadeout (1) ', 15 );
       }
    }
    Function fadeOut (where ){
    If (where <= 16 ){
    Document. bgColor = "#" + Color [where] + "0000 ";
    Where + = 1;
    SetTimeout ("fadeOut (" + where + ")", 15)
    } Else {
    SetTimeout ("fadeIn (16)", 15 );
       }
    }
    </SCRIPT>

    <Body onLoad = "fadeIn (16)">





    Background 2:
    <! -- Begin
    Var Clrs = new Array (9 );
    Clrs [0] = 'ff0000 ';
    Clrs [1] = '00ff00 ';
    Clrs [2] = '000aff ';
    Clrs [3] = 'ff00ff ';
    Clrs [4] = 'ffa500 ';
    Clrs [5] = 'ffff00 ';
    Clrs [6] = '00ff00 ';
    Clrs [7] = 'ffffff ';
    Clrs [8] = 'fffff0 ';
    Var sClrs = new Array (5 );
    SClrs [0] = 'ffa500 ';
    SClrs [1] = '55ff66 ';
    SClrs [2] = 'ac9dfc ';
    SClrs [3] = 'fff000 ';
    SClrs [4] = 'fffff0 ';
    Var yBase;
    Var xBase;
    Var step;
    Var currStep = 0;
    Var Xpos = 1;
    Var Ypos = 1;
    Var initialStarColor = 'ffa000 ';
    Var Mtop = 250;
    Var Mleft = 250;
    Function Fireworks (){
    If (document. all ){
    YBase = specified parameter doc ument. body. offsetHeight/3;
    XBase = specified parameter doc ument. body. offsetWidth/8;
    }
    Else if (document. layers ){
    YBase = window. innerHeight/3;
    XBase = window. innerWidth/8;
    }
    If (document. all ){
    Step = 5;
    For (I = 0; I <starsDiv. all. length; I ++ ){
    For (ai = 0; ai <Clrs. length; ai ++ ){
    Var c = Math. round (Math. random () * [ai]);
    }
    If (currStep <90)
    StarsDiv. all [I]. style. background = initialStarColor;
    If (currStep> 90)
    StarsDiv. all [I]. style. background = Clrs [c];
    StarsDiv. all [I]. style. top = Mtop + yBase * Math. sin (currStep + I * 5)/3) * Math. sin (550 + currStep/100)
    StarsDiv. all [I]. style. left = Mleft + yBase * Math. cos (currStep + I * 5)/3) * Math. sin (550 + currStep/100)
    }
    }
    Else if (document. layers ){
    Step = 5;
    For (j = 0; j <24; j ++) {// number of NS layers!
    Var templayer = "a" + j;
    For (ai = 0; ai <Clrs. length; ai ++ ){
    Var c = Math. round (Math. random () * [ai]);
    }
    If (currStep <90)
    Document. layers [templayer]. bgColor = initialStarColor;
    If (currStep> 90)
    Document. layers [templayer]. bgColor = Clrs [c];
    Document. layers [templayer]. top = Mtop + yBase * Math. sin (currStep + j * 5)/3) * Math. sin (550 + currStep/100)
    Document. layers [templayer]. left = Mleft + yBase * Math. cos (currStep + j * 5)/3) * Math. sin (550 + currStep/100)
    }
    }
    CurrStep + = step;
    T = setTimeout ("Fireworks ()", 5 );
    If (currStep = 220 ){
    CurrStep =-10;
    For (n = 0; n <sClrs. length; n ++ ){
    Var k = Math. round (Math. random () * n );
    }
    InitialStarColor = sClrs [k];
    If (document. all ){
    Dtop = Upload doc ument. body. clientHeight-250;
    Dleft = xBase * 3.5;
    Mtop = Math. round (Math. random () * Dtop );
    Mleft = Math. round (Math. random () * Dleft );
    Document. all. starsDiv. style. top = Mtop + document. body. scrollTop;
    Document. all. starsDiv. style. left = Mleft + document. body. scrollLeft;
    }
    Else if (document. layers ){
    Dleft = window. innerWidth-100;
    Dtop = window. innerHeight-100;
    Mtop = Math. round (Math. random () * Dtop + window. pageYOffset );
    Mleft = Math. round (Math. random () * Dleft + window. pageXOffset );
    Document. layers [templayer]. top = Mtop;
    Document. layers [templayer]. left = Mleft;
    }
    If (Mtop <20) | (Mleft <20 )){
    Mtop + = 90;
    Mleft + = 90;
    }
    }
    }
    Fireworks ();
    // End -->
    </Script>
  78. The simplest one
    <Style>
    Body {background-image: url (http://bbs.menhutong.com.cn/attachments/month_0909/20090921_9e19ecaf3dda518df976EMvOMd01ZzG1.jpg); background-repeat: no-repeat; background-position: top center; padding-top: 52px ;}
    . Main01 {clear: both; width: 960px; margin: 10px auto 0px auto; overflow: hidden ;}
    . Main01. left {float: left; width: 300px ;}
    </Style>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.