Diễn đàn Trái Tim Yên Bái 2024

 Quên mật khẩu
 Đăng ký
Xem: 3364|Trả lời: 0
Thu gọn cột thông tin

Tạo hoa mai rơi, hoặc tùy thích

[Lấy địa chỉ]
  • Tâm trạng hàng ngày
    Suy ngẫm
    22-4-2024 05:18 PM
  • Đã viết: 4 ngày

    [LV.2]Spam 2

    Đăng lúc 11-4-2008 07:12 PM | Xem tất |Chế độ đọc

    Mời bạn đăng ký để giao lưu kết bạn nhé <3

    Bạn phải đăng nhập để xem được nội dung, nếu bạn chưa có tài khoản? hãy Đăng ký

    x
    1. <script type="text/javascript">
    2. /******************************************
    3. * Snow Effect Script- By Altan d.o.o. (http://www.altan.hr/snow/index.html)
    4. * Visit Dynamic Drive DHTML code library (http://www.dynamicdrive.com/) for full source code
    5. * Last updated Nov 9th, 05' by DD. This notice must stay intact for use
    6. ******************************************/
    7.   
    8.   //Configure below to change URL path to the snow image
    9.   var snowsrc="style_images/<#IMG_DIR#>/snow.gif"
    10.   // Configure below to change number of snow to render
    11.   var no = 10;
    12.   // Configure whether snow should disappear after x seconds (0=never):
    13.   var hidesnowtime = 0;
    14.   // Configure how much snow should drop down before fading ("windowheight" or "pageheight")
    15.   var snowdistance = "pageheight";
    16. ///////////Stop Config//////////////////////////////////
    17.   var ie4up = (document.all) ? 1 : 0;
    18.   var ns6up = (document.getElementById&&!document.all) ? 1 : 0;
    19.     function iecompattest(){
    20.     return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
    21.     }
    22.   var dx, xp, yp;    // coordinate and position variables
    23.   var am, stx, sty;  // amplitude and step variables
    24.   var i, doc_width = 800, doc_height = 600;
    25.   
    26.   if (ns6up) {
    27.     doc_width = self.innerWidth;
    28.     doc_height = self.innerHeight;
    29.   } else if (ie4up) {
    30.     doc_width = iecompattest().clientWidth;
    31.     doc_height = iecompattest().clientHeight;
    32.   }
    33.   dx = new Array();
    34.   xp = new Array();
    35.   yp = new Array();
    36.   am = new Array();
    37.   stx = new Array();
    38.   sty = new Array();
    39.   snowsrc=(snowsrc.indexOf("dynamicdrive.com")!=-1)? "snow.gif" : snowsrc
    40.   for (i = 0; i < no; ++ i) {  
    41.     dx[i] = 0;                        // set coordinate variables
    42.     xp[i] = Math.random()*(doc_width-50);  // set position variables
    43.     yp[i] = Math.random()*doc_height;
    44.     am[i] = Math.random()*20;         // set amplitude variables
    45.     stx[i] = 0.02 + Math.random()/10; // set step variables
    46.     sty[i] = 0.7 + Math.random();     // set step variables
    47.         if (ie4up||ns6up) {
    48.       if (i == 0) {
    49.         document.write("<div id="dot"+ i +"" style="POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;"><a href="http://dynamicdrive.com"><img src='"+snowsrc+"' border="0"><\/a><\/div>");
    50.       } else {
    51.         document.write("<div id="dot"+ i +"" style="POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;"><img src='"+snowsrc+"' border="0"><\/div>");
    52.       }
    53.     }
    54.   }
    55.   function snowIE_NS6() {  // IE and NS6 main animation function
    56.     doc_width = ns6up?window.innerWidth-10 : iecompattest().clientWidth-10;
    57.         doc_height=(window.innerHeight && snowdistance=="windowheight")? window.innerHeight : (ie4up && snowdistance=="windowheight")?  iecompattest().clientHeight : (ie4up && !window.opera && snowdistance=="pageheight")? iecompattest().scrollHeight : iecompattest().offsetHeight;
    58.     for (i = 0; i < no; ++ i) {  // iterate for every dot
    59.       yp[i] += sty[i];
    60.       if (yp[i] > doc_height-50) {
    61.         xp[i] = Math.random()*(doc_width-am[i]-30);
    62.         yp[i] = 0;
    63.         stx[i] = 0.02 + Math.random()/10;
    64.         sty[i] = 0.7 + Math.random();
    65.       }
    66.       dx[i] += stx[i];
    67.       document.getElementById("dot"+i).style.top=yp[i]+"px";
    68.       document.getElementById("dot"+i).style.left=xp[i] + am[i]*Math.sin(dx[i])+"px";  
    69.     }
    70.     snowtimer=setTimeout("snowIE_NS6()", 10);
    71.   }
    72.     function hidesnow(){
    73.         if (window.snowtimer) clearTimeout(snowtimer)
    74.         for (i=0; i<no; i++) document.getElementById("dot"+i).style.visibility="hidden"
    75.     }
    76.         
    77. if (ie4up||ns6up){
    78.     snowIE_NS6();
    79.         if (hidesnowtime>0)
    80.         setTimeout("hidesnow()", hidesnowtime*1000)
    81.         }
    82. </script>
    Sao chép mã

    chèn dưới thẻ java trong boad hoặc thẻ body
    Thay snow.gif bằng ảnh theo ý thích
    Bạn phải đăng nhập mới được đăng bài Đăng nhập | Đăng ký

    Quy tắc điểm

    Đóng

    Thông báoTrước /1 Sau

    Phòng tối|Lưu trữ|Diễn đàn Yên Bái 2024 Community Guidelines |

    GMT+7, 6-12-2026 02:36 AM , Processed in 0.020699 second(s), 18 queries .

    Powered by Discuz! X3.4

    © 2001-2013 Comsenz Inc.

    Trả lời nhanh Lên trên Trở lại danh sách