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

Code thanh truot hai ben

5 9 0

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

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 5
Dung lượng 10,72 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

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]

Trang 1

Code thanh 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) ? 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 sẽ tạo 1 mảng các trị màu thay đổi 1 cách tuần tự

Trang 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ử của mảng, 300 là thời gian delay giữa 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 nền

theo các phần tử trong mảng c , ví dụ khi x = 2 ta sẽ có màu nền là #562200

- Ngoài ra bạn có thể chỉnh đoạn code trên lại như thế này : col_val = "#5600" + c[x] ;

tức là trị màu sẽ thay đổi ở 2 bit cuối ví dụ khi x=2 ta sẽ có màu nền là #560022

- Nếu muốn màu thay đổi nhiều hơn nưa thì các bạn cứ việc thêm phần tử vào mảng c Ví

dụ ta có 20 màu sẽ được thay đổi như 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);

}

}

Trang 3

change_bg = setInterval("bg_eff()", 300);

</script>

CẢM ƠN QUÝ VỊ ĐÃ GHÉ THĂM ( hình nền 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 nề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"</td>

</tr>

</table> </div>

</div>

quả cầu xoay

Trang 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 sự đóng

góp của 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=

Trang 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>

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

TỪ KHÓA LIÊN QUAN

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

TÀI LIỆU LIÊN QUAN

w