1. Trang chủ
  2. » Kỹ Thuật - Công Nghệ

Code thanh truot hai ben

5 8 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

CẢM ƠN QUÝ VỊ ĐÃ GHÉ THĂM hình nền logo chữ chạy lên CẢM ƠN QUÝ VỊ ĐÃ GHÉ THĂM WEBSITE THÔNG TIN NGUYỄN H ÙNG.. MỌI Ý KIẾN ĐÓNG GÓP CỦA QUÝ VỊ SẼ LÀ NGUỒN ĐỘNG VIÊN RẤT LỚN.[r]

(1)Code trượt hai bên <div id="divTopLeft" style="position:absolute; z-index:-1000;"> <embed src="http://d.violet.vn/uploads/resources/615/trai.swf" width="110px" height="400px"></div> <div id="divTopRight" style="position:absolute; z-index:-1000;"> <embed src="http://d.violet.vn/uploads/resources/615/phai.swf" width="110px" height="400px"></div> <script type="text/javascript"> var ns = (navigator.appName.indexOf("Netscape") != -1); var d = document; function JSFX_FloatDiv(id, sx, sy) { var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id]; var px = document.layers ? "" : "px"; window[id + "_obj"] = el; if(d.layers)el.style=el; el.cx = el.sx = sx;el.cy = el.sy = sy; el.sP=function(x,y){this.style.left=x+px;this.style.top=y+px;}; el.floatIt=function() { var pX, pY; pX = (this.sx >= 0) ? : ns ? innerWidth : document.documentElement && document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth; pY = ns ? pageYOffset : document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop; if(this.sy<0) pY += ns ? innerHeight : document.documentElement && document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight; this.cx += (pX + this.sx - this.cx)/8;this.cy += (pY + this.sy - this.cy)/8; this.sP(this.cx, this.cy); setTimeout(this.id + "_obj.floatIt()", 40); } return el; } JSFX_FloatDiv("divTopLeft", 0,0).floatIt(); JSFX_FloatDiv("divTopRight", -120,0).floatIt(); Sript đổi màu background khá hay Để tạo nên hiệu hứng đổi màu cho đẹp và liên tục, các bạn tạo mảng các trị màu thay đổi cách (2) <script type="text/javascript"> var c = new Array("00", "11", "22", "33", "44", "55", "66", "77", "88", "99", "AA", "BB", "CC", "DD", "EE", "FF"); x = 0; function bg_eff() { col_val = "#56" + c[x] +"00"; document.bgColor=col_val; x++; if (x == 16) { clearInterval(change_bg); } } change_bg = setInterval("bg_eff()", 300); </script> - Trong code trên : 16 là số phần tử mảng, 300 là thời gian delay các lần đổi màu - Chú ý đoạn code này : col_val = "#56" + c[x] +"00"; : đây là code tạo trị màu theo các phần tử mảng c , ví dụ x = ta có màu là #562200 - Ngoài bạn có thể chỉnh đoạn code trên lại này : col_val = "#5600" + c[x] ; tức là trị màu thay đổi bit cuối ví dụ x=2 ta có màu là #560022 - Nếu muốn màu thay đổi nhiều nưa thì các bạn việc thêm phần tử vào mảng c Ví dụ ta có 20 màu thay đổi bên dưới: <script type="text/javascript"> var c = new Array("00", "10", "15", "20", "25", "30", "35", "40", "45", "50","55", "60", "65", "70", "75", "80", "85", "90", "95", "AA"); x = 0; function bg_eff() { col_val = "#56" + c[x] +"00"; document.bgColor=col_val; x++; if (x == 20) { clearInterval(change_bg); } } (3) change_bg = setInterval("bg_eff()", 300); </script> CẢM ƠN QUÝ VỊ ĐÃ GHÉ THĂM ( hình logo chữ chạy lên) <table width="200"> <tr> <td style="padding: 15px" background= "http://img1.imagehousing.com/27/e01a81c18951a596b6c25db8f25b444b.jpg"> <font size="5" color="blue"><marquee scrollamount="1" direction="up" width="300" height="400" scrolldelay="6">CẢM ƠN QUÝ VỊ ĐÃ GHÉ THĂM WEBSITE THÔNG TIN NGUYỄN H ÙNG.<br> MỌI Ý KIẾN ĐÓNG GÓP CỦA QUÝ VỊ SẼ LÀ NGUỒN ĐỘNG VIÊN RẤT LỚN.<br> ĐT: 0976.087.247.<br> Email: info@123doc.org;br> website: http://phuoctienb.violet.vn/</marquee></font></td> </tr> </table> </div> </div> Hình <table width="200"> <tr> <td style="padding: 15px" background= "http://img1.imagehousing.com/27/e01a81c18951a596b6c25db8f25b444b.jpg"> <font size="5" color="blue"><marquee scrollamount="1" direction="up" width="300" height="400"</td> </tr> </table> </div> </div> cầu xoay (4) <img src="http://d.violet.vn/uploads/resources/207/0.Cau_quay.gif"> GIỚI THIỆUH TRƯỜNG CHU CHAY <marquee onmouseover="onmouseout=" scrollamount="2" direction= "<html"><font face="Arial" size="2" color="blue">Phòng giáo dục đào tạo Bác Ái</font><br> <span style="position: absolute; left: 0px; top: 0px; width: 100%"><marquee behavior="ALTERNATE"><strong><font color="#B93B8F">TRƯỜNG TH PHƯỚC TIẾN B XIN KÍNH CHÀO!</font> </strong></marquee></span> <font face="Bodoni" size="3" color="red">Rất mong đóng góp quý thầy cô.</font></marquee></font></div> HOA RƠI <marquee style= "z-index: 1; left: 777px; width: 30px; position: absolute; top: -11px; height: 800px;" scrollamount="4" direction="down"><span class="falling1"><img src= "http://www.blinkyou.com/falling/images/hotpinkflower.gif"></span></marquee> <marquee style= "z-index: 1; left: 191px; width: 30px; position: absolute; top: -231px; height: 800px;" scrollamount="5" direction="down"><span class="falling1"><img src= "http://www.blinkyou.com/falling/images/hotpinkflower.gif"></span></marquee> <marquee style= "z-index: 1; left: 736px; width: 30px; position: absolute; top: -266px; height: 800px;" scrollamount="7" direction="down"><span class="falling1"><img src= "http://www.blinkyou.com/falling/images/hotpinkflower.gif"></span></marquee> <marquee style= "z-index: 1; left: 772px; width: 30px; position: absolute; top: -495px; height: 800px;" scrollamount="9" direction="down"><span class="falling1"><img src= "http://www.blinkyou.com/falling/images/hotpinkflower.gif"></span></marquee> <marquee style= "z-index: 1; left: 425px; width: 30px; position: absolute; top: -440px; height: 800px;" direction="down"><span class="falling1"><img src= "http://www.blinkyou.com/falling/images/hotpinkflower.gif"></span></marquee> <marquee style= (5) "z-index: 1; left: 745px; width: 30px; position: absolute; top: -133px; height: 800px;" scrollamount="3" direction="down"><span class="falling1"><img src= "http://www.blinkyou.com/falling/images/hotpinkflower.gif"></span></marquee> <marquee style= "z-index: 1; left: 270px; width: 30px; position: absolute; top: -335px; height: 800px;" scrollamount="4" direction="down"><span class="falling1"><img src= "http://www.blinkyou.com/falling/images/hotpinkflower.gif"></span></marquee> <marquee style= "z-index: 1; left: 248px; width: 30px; position: absolute; top: -121px; height: 800px;" scrollamount="7" direction="down"><span class="falling1"><img src= "http://www.blinkyou.com/falling/images/hotpinkflower.gif"></span></marquee><marq uee style= "z-index: 1; left: 374px; width: 30px; position: absolute; top: -478px; height: 800px;" scrollamount="2" direction="down"><span class="falling1"><img src= "http://www.blinkyou.com/falling/images/hotpinkflower.gif"></span></marquee><div> <center> (6)

Ngày đăng: 09/06/2021, 12:29

Xem thêm:

TÀI LIỆU CÙNG NGƯỜI DÙNG

  • Đang cập nhật ...

TÀI LIỆU LIÊN QUAN

w