网页特效代码备用录

原创 2005年04月23日 17:38:00

网页特效代码备用录


首先推荐几个好网站,很多的特效代码:)
http://suny126.anyp.cn/1.aspx
http://free.2259.com/
http://www.k688.com/javascript/

---------------------------------------------
●设置网页背景音乐
1.常规背景音乐
把下列HTML代码加入到页面源程序的<body>和</body>之间.
<bgsound  src="//背景音乐路径"  loop="//播放次数">
注:loop的参数为infinite,循环播放.
2.可控制播放的背景音乐
在源代中码的<body>中加上下面的代码:
<embed  src="背景音乐路径" width="280" height="45">

●给自己的blog添加自己所在地区的天气情况!

修改您的模板,转换到源代码状态,在您要显示天气资料的地方插入代码:

代码::
<IFRAME border=0 align=center marginWidth=0 marginHeight=0 src="http://appnews.qq.com/cgi-bin/news_qq_search?city=厦门" frameBorder=0 width=157 scrolling=no height=240 allowTransparency></IFRAME>

注意,你可以修改上面代码的 厦门 两字,改为您所在的地区,一般的城市名字都能够显示出来
转自:http://dicky.blogcup.com/cat_dicky_1038.html

 

●游动的金鱼代码
</SPAN><EMBED style="LEFT: 10px; POSITION: absolute; TOP: 0px; absolute: " align=right src=http://chaozsq.home.sunbo.net/xfile.php?xname=13GI401&amp;fname=yu.swf width=800 height=768 type=application/x-shockwave-flash ;; quality="high" wmode="transparent"></TD>


●给自己的blog加入Flash时钟!
<DIV align=center>
<OBJECT style="WIDTH: 84px; HEIGHT: 84px" codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0 height=84 width=84 classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000><PARAM NAME="_cx" VALUE="2223"><PARAM NAME="_cy" VALUE="2223"><PARAM NAME="FlashVars" VALUE=""><PARAM NAME="Movie" VALUE="cup/time.swf"><PARAM NAME="Src" VALUE="cup/time.swf"><PARAM NAME="WMode" VALUE="Transparent"><PARAM NAME="Play" VALUE="0"><PARAM NAME="Loop" VALUE="-1"><PARAM NAME="Quality" VALUE="High"><PARAM NAME="SAlign" VALUE=""><PARAM NAME="Menu" VALUE="-1"><PARAM NAME="Base" VALUE=""><PARAM NAME="AllowScriptAccess" VALUE="always"><PARAM NAME="Scale" VALUE="ShowAll"><PARAM NAME="DeviceFont" VALUE="0"><PARAM NAME="EmbedMovie" VALUE="0"><PARAM NAME="BGColor" VALUE=""><PARAM NAME="SWRemote" VALUE=""><PARAM NAME="MovieData" VALUE=""><PARAM NAME="SeamlessTabbing" VALUE="1">
     
  <embed src="cup/time.swf" wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="32" height="32"></embed>
</OBJECT></DIV>

 

●跟随鼠标飘动的双层时钟

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 6.00.2600.0" name=GENERATOR></HEAD>
<BODY>
<SCRIPT language=JavaScript>
dCol='000000';//date colour.
fCol='000000';//face colour.
sCol='000000';//seconds colour.
mCol='000000';//minutes colour.
hCol='000000';//hours colour.
ClockHeight=40;
ClockWidth=40;
ClockFromMouseY=0;
ClockFromMouseX=100;

//Alter nothing below! Alignments will be lost!

d=new Array("SUNDAY","MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY");
m=new Array("JANUARY","FEBRUARY","MARCH","APRIL","MAY","JUNE","JULY","AUGUST","SEPTEMBER","OCTOBER","NOVEMBER","DECEMBER");
date=new Date();
day=date.getDate();
year=date.getYear();
if (year < 2000) year=year+1900;
TodaysDate=" "+d[date.getDay()]+" "+day+" "+m[date.getMonth()]+" "+year;
D=TodaysDate.split('');
H='...';
H=H.split('');
M='....';
M=M.split('');
S='.....';
S=S.split('');
Face='1 2 3 4 5 6 7 8 9 10 11 12';
font='Arial';
size=1;
speed=0.6;
ns=(document.layers);
ie=(document.all);
Face=Face.split(' ');
n=Face.length;
a=size*10;
ymouse=0;
xmouse=0;
scrll=0;
props="<font face="+font+" size="+size+" color="+fCol+"><B>";
props2="<font face="+font+" size="+size+" color="+dCol+"><B>";
Split=360/n;
Dsplit=360/D.length;
HandHeight=ClockHeight/4.5
HandWidth=ClockWidth/4.5
HandY=-7;
HandX=-2.5;
scrll=0;
step=0.06;
currStep=0;
y=new Array();x=new Array();Y=new Array();X=new Array();
for (i=0; i < n; i++){y[i]=0;x[i]=0;Y[i]=0;X[i]=0}
Dy=new Array();Dx=new Array();DY=new Array();DX=new Array();
for (i=0; i < D.length; i++){Dy[i]=0;Dx[i]=0;DY[i]=0;DX[i]=0}
if (ns){
for (i=0; i < D.length; i++)
document.write('<layer name="nsDate'+i+'" top=0 left=0 height='+a+' width='+a+'><center>'+props2+D[i]+'</font></center></layer>');
for (i=0; i < n; i++)
document.write('<layer name="nsFace'+i+'" top=0 left=0 height='+a+' width='+a+'><center>'+props+Face[i]+'</font></center></layer>');
for (i=0; i < S.length; i++)
document.write('<layer name=nsSeconds'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+sCol+'><center><b>'+S[i]+'</b></center></font></layer>');
for (i=0; i < M.length; i++)
document.write('<layer name=nsMinutes'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+mCol+'><center><b>'+M[i]+'</b></center></font></layer>');
for (i=0; i < H.length; i++)
document.write('<layer name=nsHours'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+hCol+'><center><b>'+H[i]+'</b></center></font></layer>');
}
if (ie){
document.write('<div id="Od" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < D.length; i++)
document.write('<div id="ieDate" style="position:absolute;top:0px;left:0;height:'+a+';width:'+a+';text-align:center">'+props2+D[i]+'</B></font></div>');
document.write('</div></div>');
document.write('<div id="Of" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < n; i++)
document.write('<div id="ieFace" style="position:absolute;top:0px;left:0;height:'+a+';width:'+a+';text-align:center">'+props+Face[i]+'</B></font></div>');
document.write('</div></div>');
document.write('<div id="Oh" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < H.length; i++)
document.write('<div id="ieHours" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+hCol+';text-align:center;font-weight:bold">'+H[i]+'</div>');
document.write('</div></div>');
document.write('<div id="Om" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < M.length; i++)
document.write('<div id="ieMinutes" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+mCol+';text-align:center;font-weight:bold">'+M[i]+'</div>');
document.write('</div></div>')
document.write('<div id="Os" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < S.length; i++)
document.write('<div id="ieSeconds" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+sCol+';text-align:center;font-weight:bold">'+S[i]+'</div>');
document.write('</div></div>')
}
(ns)?window.captureEvents(Event.MOUSEMOVE):0;
function Mouse(evnt){
ymouse = (ns)?evnt.pageY+ClockFromMouseY-(window.pageYOffset):event.y+ClockFromMouseY;
xmouse = (ns)?evnt.pageX+ClockFromMouseX:event.x+ClockFromMouseX;
}
(ns)?window.onMouseMove=Mouse:document.onmousemove=Mouse;
function ClockAndAssign(){
time = new Date ();
secs = time.getSeconds();
sec = -1.57 + Math.PI * secs/30;
mins = time.getMinutes();
min = -1.57 + Math.PI * mins/30;
hr = time.getHours();
hrs = -1.575 + Math.PI * hr/6+Math.PI*parseInt(time.getMinutes())/360;
if (ie){
Od.style.top=window.document.body.scrollTop;
Of.style.top=window.document.body.scrollTop;
Oh.style.top=window.document.body.scrollTop;
Om.style.top=window.document.body.scrollTop;
Os.style.top=window.document.body.scrollTop;
}
for (i=0; i < n; i++){
 var F=(ns)?document.layers['nsFace'+i]:ieFace[i].style;
 F.top=y[i] + ClockHeight*Math.sin(-1.0471 + i*Split*Math.PI/180)+scrll;
 F.left=x[i] + ClockWidth*Math.cos(-1.0471 + i*Split*Math.PI/180);
 }
for (i=0; i < H.length; i++){
 var HL=(ns)?document.layers['nsHours'+i]:ieHours[i].style;
 HL.top=y[i]+HandY+(i*HandHeight)*Math.sin(hrs)+scrll;
 HL.left=x[i]+HandX+(i*HandWidth)*Math.cos(hrs);
 }
for (i=0; i < M.length; i++){
 var ML=(ns)?document.layers['nsMinutes'+i]:ieMinutes[i].style;
 ML.top=y[i]+HandY+(i*HandHeight)*Math.sin(min)+scrll;
 ML.left=x[i]+HandX+(i*HandWidth)*Math.cos(min);
 }
for (i=0; i < S.length; i++){
 var SL=(ns)?document.layers['nsSeconds'+i]:ieSeconds[i].style;
 SL.top=y[i]+HandY+(i*HandHeight)*Math.sin(sec)+scrll;
 SL.left=x[i]+HandX+(i*HandWidth)*Math.cos(sec);
 }
for (i=0; i < D.length; i++){
 var DL=(ns)?document.layers['nsDate'+i]:ieDate[i].style;
 DL.top=Dy[i] + ClockHeight*1.5*Math.sin(currStep+i*Dsplit*Math.PI/180)+scrll;
 DL.left=Dx[i] + ClockWidth*1.5*Math.cos(currStep+i*Dsplit*Math.PI/180);
 }
currStep-=step;
}
function Delay(){
scrll=(ns)?window.pageYOffset:0;
Dy[0]=Math.round(DY[0]+=((ymouse)-DY[0])*speed);
Dx[0]=Math.round(DX[0]+=((xmouse)-DX[0])*speed);
for (i=1; i < D.length; i++){
Dy[i]=Math.round(DY[i]+=(Dy[i-1]-DY[i])*speed);
Dx[i]=Math.round(DX[i]+=(Dx[i-1]-DX[i])*speed);
}
y[0]=Math.round(Y[0]+=((ymouse)-Y[0])*speed);
x[0]=Math.round(X[0]+=((xmouse)-X[0])*speed);
for (i=1; i < n; i++){
y[i]=Math.round(Y[i]+=(y[i-1]-Y[i])*speed);
x[i]=Math.round(X[i]+=(x[i-1]-X[i])*speed);
}
ClockAndAssign();
setTimeout('Delay()',20);
}
if (ns||ie)window.onload=Delay;
</SCRIPT>
</BODY></HTML>

 

●跟随鼠标的彩色时钟,在黑色背景下效果更酷

脚本说明:
把如下代码加入<body>区域中
<script language="JavaScript">
<!--
fCol='00ffff';//face colour.
dCol='fff000';//dot colour.
hCol='ff0000';//hours colour.
mCol='00ff00';//minutes colour.
sCol='7788ff';//seconds colour.
ClockHeight=35;
ClockWidth=35;
ClockFromMouseY=80;
ClockFromMouseX=5;

//Alter nothing below! Alignments will be lost!
ns=(document.layers);
ie=(document.all);
h=3;
m=4;
s=5;
face='1 2 3 4 5 6 7 8 9 10 11 12';
face=face.split(' ');
n=face.length;
speed=0.6;
ymouse=0;
xmouse=0;
scrll=0;
p="<font face=Arial size=1 color="+fCol+">";
e=360/n;
HandHeight=ClockHeight/4;
HandWidth=ClockWidth/4;
HandY=0;
HandX=0;
scrll=0;
y=new Array();x=new Array();Y=new Array();X=new Array();
for (i=0; i < 37; i++){y[i]=0;x[i]=0;Y[i]=0;X[i]=0}
Dy=new Array();Dx=new Array();DY=new Array();DX=new Array();
for (i=0; i < n; i++){Dy[i]=0;Dx[i]=0;DY[i]=0;DX[i]=0}
if (ns){
for (i=0; i < n; i++)
document.write('<layer name="nsN'+i+'" top=0 left=0 height=15 width=15><center>'+p+face[i]+'</font></center></layer>');
for (i=0; i < n; i++)
document.write('<layer name="nsD'+i+'" top=0 left=0 bgcolor='+dCol+' clip="0,0,2,2"></layer>');
for (i=0; i < h; i++)
document.write('<layer name=nsH'+i+' top=0 left=0 bgcolor='+hCol+' clip="0,0,2,2"></layer>');
for (i=0; i < m; i++)
document.write('<layer name=nsM'+i+' top=0 left=0 bgcolor='+mCol+' clip="0,0,2,2"></layer>');
for (i=0; i < s; i++)
document.write('<layer name=nsS'+i+' top=0 left=0 bgcolor='+sCol+' clip="0,0,2,2"></layer>');
}
if (ie){
document.write('<div id="On" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < n; i++)
document.write('<div id="ieN" style="position:absolute;width:15px;height:15px;text-align:center">'+p+face[i]+'</font></div>');
document.write('</div></div>');
document.write('<div id="Od" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < n; i++)
document.write('<div id="ieD" style="position:absolute;height:2px;width:2px;font-size:2px;background:'+dCol+'"></div>');
document.write('</div></div>');
document.write('<div id="Oh" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < h; i++)
document.write('<div id="ieH" style="position:absolute;width:2px;height:2px;font-size:2px;background:'+hCol+'"></div>');
document.write('</div></div>');
document.write('<div id="Om" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < m; i++)
document.write('<div id="ieM" style="position:absolute;width:2px;height:2px;font-size:2px;background:'+mCol+'"></div>');
document.write('</div></div>')
document.write('<div id="Os" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < s; i++)
document.write('<div id="ieS" style="position:absolute;width:2px;height:2px;font-size:2px;background:'+sCol+'"></div>');
document.write('</div></div>')
}

(ns)?window.captureEvents(Event.MOUSEMOVE):0;
function Mouse(evnt){
ymouse = (ns)?evnt.pageY+ClockFromMouseY-(window.pageYOffset):event.y+ClockFromMouseY;
xmouse = (ns)?evnt.pageX+ClockFromMouseX:event.x+ClockFromMouseX;
}
(ns)?window.onMouseMove=Mouse:document.onmousemove=Mouse;

function ClockAndAssign(){
time = new Date ();
secs = time.getSeconds();
sec = -1.57 + Math.PI * secs/30;
mins = time.getMinutes();
min = -1.57 + Math.PI * mins/30;
hr = time.getHours();
hrs = -1.575 + Math.PI * hr/6+Math.PI*parseInt(time.getMinutes())/360;
if (ie){
On.style.top=window.document.body.scrollTop;
Od.style.top=window.document.body.scrollTop;
Oh.style.top=window.document.body.scrollTop;
Om.style.top=window.document.body.scrollTop;
Os.style.top=window.document.body.scrollTop;
}
for (i=0; i < s; i++){
 var sd=(ns)?document.layers['nsS'+i]:ieS[i].style;
 sd.top=y[8+i]+HandY+(i*HandHeight)*Math.sin(sec)+scrll;
 sd.left=x[8+i]+HandX+(i*HandWidth)*Math.cos(sec);
}
for (i=0; i < m; i++){
 var md=(ns)?document.layers['nsM'+i]:ieM[i].style;
 md.top=y[4+i]+HandY+(i*HandHeight)*Math.sin(min)+scrll;
 md.left=x[4+i]+HandX+(i*HandWidth)*Math.cos(min);
}
for (i=0; i < h; i++){
 var hd=(ns)?document.layers['nsH'+i]:ieH[i].style;
 hd.top=y[1+i]+HandY+(i*HandHeight)*Math.sin(hrs)+scrll;
 hd.left=x[1+i]+HandX+(i*HandWidth)*Math.cos(hrs);
}
for (i=0; i < n; i++){
 var D=(ns)?document.layers['nsD'+i]:ieD[i].style;
 D.top=y[13+i] + ClockHeight*Math.sin(-1.0471 + i*e*Math.PI/180)+scrll;
 D.left=x[13+i] + ClockWidth*Math.cos(-1.0471 + i*e*Math.PI/180);
}
for (i=0; i < n; i++){
 var N=(ns)?document.layers['nsN'+i]:ieN[i].style;
 N.top=y[25+i]-6 + ClockHeight*1.4*Math.sin(-1.0471 + i*e*Math.PI/180)+scrll;
 N.left=x[25+i]-6 + ClockWidth*1.4*Math.cos(-1.0471 + i*e*Math.PI/180);
}
}

function Delay(){
scrll=(ns)?window.pageYOffset:0;
y[0]=Math.round(Y[0]+=((ymouse)-Y[0])*speed);
x[0]=Math.round(X[0]+=((xmouse)-X[0])*speed);
for (i=1; i < 37; i++){
y[i]=Math.round(Y[i]+=(y[i-1]-Y[i])*speed);
x[i]=Math.round(X[i]+=(x[i-1]-X[i])*speed);
}
ClockAndAssign();
setTimeout('Delay()',20);
}
if (ns||ie)window.onload=Delay;
//-->
</script>


 

●金鱼代码:</SPAN><EMBED style="LEFT: 10px; POSITION: absolute; TOP: 0px; absolute: " align=right src=http://chaozsq.home.sunbo.net/xfile.php?xname=13GI401&amp;fname=yu.swf width=800 height=768 type=application/x-shockwave-flash ;; quality="high" wmode="transparent"></TD>&nbsp;

<style type="text/css">body{cursor:url(鼠标地址)}</style>
比如:<STYLE type=text/css>body{cursor:url(http://asp2.6to23.com/whslj/lyb/pic/cur.ani)}</STYLE>

绿叶 http://go.6to23.com/xgrq/zz/4.cur

海豚http://chenmo521.51.net/dama/sb/001.ani
花树枝 http://yuhou.net/work/images/xw_answer/liujg_xw_answer_nor.cur)'>


小点跟随http://yuhou.net/images/liujg_m030719.ani)'>


粉红玫瑰http://yuhou.net/build/images/03.cur)'>


钥匙http://asp.7i24.com/yhsjxe/book1/images/c.cur)'>


小手http://asp.7i24.com/yhsjxe/book1/images/c2.cur)'>


短笔http://asp.7i24.com/yhsjxe/links/01.cur)'>


太阳花http://lssm.wx-e.com/images/lssm.ani)'>


绿色样式剪头http://home.vipcp.net/kukumm/diary1/images/kuru2r.ani)'>


有点像猫http://asp2.6to23.com/whslj/lyb/pic/cur.ani)'>


小色杆http://lengku.net//index/mouse.ani)'>


银色样式剪头http://nms.voline.net/aspsky/skins/dream/mouse.ani)'>


蝴蝶http://asp2.6to23.com/rlf/gb3/pic/cur.ani)'>


小钟点样式http://asp2.6to23.com/peg3/clover3/pic/cur.ani)'>


十字http://asp2.6to23.com/peg3/sky/pic/cross.ani)'>


样式剪头http://asp2.6to23.com/peg3/sky/pic/cur.ani)'>


银杆http://asp2.6to23.com/peg3/sd/pic/cur.cur)'>

带头粉红杆http://asp2.6to23.com/peg3/sakura/pic/cur.ani)'>


两十字http://www.bluenuo.com/gbbear/pic/cur.ani)'>

兔头http://50net.com/book/img2/1.ani)'>


螺旋http://50net.com/home/ani5.ani)'>

http://50net.com/forest/1.ico)'>


http://50net.com/forest/2.ico)'>

动态小鼠http://www.kulongnvhai.com/free/pic/cur.ani)'>

尾动灰色http://fhwep.lwang.net/Images/Wag3dg.ani)'>


●时间问候代码:
<Script Language="JavaScript">   <!--   var text=""; day = new Date( ); time = day.getHours( );   if (( time>=0) &amp;&amp; (time < 7 ))     text="夜猫子,要注意身体哦! "   if (( time >= 7 ) &amp;&amp; (time < 12))     text="今天的阳光真灿烂啊,你那个朋友呢?"   if (( time >= 12) &amp;&amp; (time < 14))     text="午休时间。您要保持睡眠哦!"   if (( time >=14) &amp;&amp; (time < 18))     text="祝您下午工作愉快! "   if ((time >= 18) &amp;&amp; (time <= 22))     text="您又来了,可别和MM聊太久哦!"   if ((time >= 22) &amp;&amp; (time < 24))     text="您应该休息了!"   document.write(text)   //--->   </Script>

●向上飘扬的花:
<SCRIPT language=JavaScript>
<!-- Begin
Image0 = new Image();
Image0.src = "uploadfile/20041213103923556.gif"; Amount = 10;
Ymouse = -50;
Xmouse = -50;
Ypos = new Array();
Xpos = new Array();
Speed = new Array();
rate = new Array();
grow = new Array();
Step = new Array();
Cstep = new Array();
nsSize = new Array();
ns = (document.layers)?1:0;
(document.layers)?window.captureEvents(Event.MOUSEMOVE):0;
function Mouse(evnt) {
Ymouse=(document.layers)?evnt.pageY-20:event.y-20;
Xmouse=(document.layers)?evnt.pageX:event.x;
}
(document.layers)?window.onMouseMove=Mouse:document.onmousemove=Mouse;
for (i = 0; i < Amount; i++) {
Ypos[i] = Ymouse;
Xpos[i] = Xmouse;
Speed[i] = Math.random()*4+1;
Cstep[i] = 0;
Step[i] = Math.random()*0.1+0.05;
grow[i] = 8;
nsSize[i] = Math.random()*15+5;
rate[i] = Math.random()*0.5+0.1;
}
if (ns) {
for (i = 0; i < Amount; i++) {
document.write("<LAYER NAME='sn"+i+"' LEFT=0 TOP=0><img src="+Image0.src+" name='N' width="+nsSize[i]+" height="+nsSize[i]+"></LAYER>");
   }
}
else {
document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i = 0; i < Amount; i++) {
document.write('<img id="si" src="'+Image0.src+'" style="position:absolute;top:0px;left:0px;filter:alpha(opacity=90)">');
}
document.write('</div></div>');
}
function MouseBubbles() {
var hscrll = (document.layers)?window.pageYOffset:document.body.scrollTop;
var wscrll = (document.layers)?window.pageXOffset:document.body.scrollLeft;
for (i = 0; i < Amount; i++){
sy = Speed[i] * Math.sin(270 * Math.PI / 180);
sx = Speed[i] * Math.cos(Cstep[i] * 4);
Ypos[i] += sy;
Xpos[i] += sx;
if (Ypos[i] < -40) {
Ypos[i] = Ymouse;
Xpos[i] = Xmouse;
Speed[i] = Math.random() * 6 + 4;
grow[i] = 8;
nsSize[i] = Math.random() * 15 + 5;
}
if (ns) {
document.layers['sn'+i].left = Xpos[i] + wscrll;
document.layers['sn'+i].top = Ypos[i] + hscrll;
}
else {
si[i].style.pixelLeft = Xpos[i] + wscrll;
si[i].style.pixelTop = Ypos[i] + hscrll;
si[i].style.width = grow[i];
si[i].style.height = grow[i];
}
grow[i] += rate[i];
Cstep[i] += Step[i];
if (grow[i] > 24) grow[i] = 25;
}
setTimeout('MouseBubbles()', 10);
}
MouseBubbles();
//   -->
</SCRIPT>

 

● 网页禁止类代码


将代码加入网页源代码<body>和</body>中即可。

1. 禁止鼠标左键:

<SCRIPT>
function ni() {
 if(document.all){
  document.onselectstart=function (){return false;};
 };
};
ni();
function nn(){
 if(navigator.appName.indexOf("etscape")>-1){
  var t= document.getSelection();
  if(t!=""){
   if(navigator.appVersion.indexOf("5")==0){
    document.write("Error...");
    document.write("<A  HREF=javascript :history.go(0)>  .Go back</A>");
   }
   else{
    if(t !=" "){window.find(" ")};
   }
  };
  setTimeout("nn()",300)
 }
}
nn();
</SCRIPT>

 

2. 禁止鼠标右键

oncontextmenu="return false" onselectstart="return false" ondragstart="return false"

 

3. 禁止打印:

<SCRIPT>
function bp(){
 for(oq=0;oq<document.all.length;oq++){
  if(document.all[oq].style.visibility!="hidden"){
   document.all[oq].style.visibility="hidden";
   document.all[oq].id="y"
  }
 }
}
function ap(){
 for(oq=0;oq<document.all.length;oq++){
  if(document.all[oq].id=="y")document.all[oq].style.visibility=""
 }
}
window.onbeforeprint=bp;
window.onafterprint=ap;
</SCRIPT>

●在Blog上填加水滴效果

   有时候发现一些网页上会产生源源不断的水滴,鼠标一碰还会落下来。是不是觉得很羡慕? 现在我们也给自己的blog洒点水:)

    操作步骤:
    进入管理后台:点击修改主模板切换到源码方式编辑,在最上面插入下面代码就可以了!

<CENTER><EMBED style="LEFT: 10px; POSITION: absolute; TOP: -70px" align=right src=http://scount.jahee.com/model/fishandwaterflash/drip.swf width=700 height=400 type=application/x-shockwave-flash wmode="transparent" quality="high" ;></CENTER>

由于以上图片(http://scount.jahee.com/model/fishandwaterflash/drip.swf)遭到破坏,请大家自动更改图片地址,下面提供几个较好的给大家

http://lain1978.com/collection/flash/005.swf
http://lain1978.com/collection/flash/006.swf
http://lain1978.com/collection/flash/007.swf
http://lain1978.com/collection/flash/008.swf

-------------------------------------------------------------------------------

其他说明:
Crollbar-Face-color:滚动条页面颜色设定;
Scrollbar-Highlight-Color:滚动条斜面和左面颜色设定;
Scrollbar-Shadow-Color:滚动条下斜面和右面颜色设定;
Scrollbar-3Dlight-Color:滚动条上边和左边的边沿颜色设定;
Scrollbar-Arrow-Color:滚动条两端箭头颜色设定;
Scrollbar-Track-Color:滚动条底版颜色设定;
Scrollbar-Darkshadow-Color:滚动条下边和右边的边沿颜色设定。

国内外 JavaScript 经典网页特效代码封装

收藏自:www.blueidea.com/ 作者:k236740 一、多样化摺叠菜单:下载 一个由老外写的折叠式垂直菜单,多样化,多功能,可自订,使用容易,支持FF。 二、CSS圆角边框:下...

网页特效代码---倒计时代码

简单的倒计时代码 var urodz= new Date("3/30/2005"); var s="今天离五一劳动节"; var now = new Date(); var ile =...

网页特效代码

  • 2013年01月18日 17:09
  • 714B
  • 下载

添加网页特效代码

  • 2007年06月11日 01:54
  • 4.33MB
  • 下载

网页特效|网页特效代码(JsHtml.cn)---左右选择添加删除内容菜单

网页特效|网页特效代码(JsHtml.cn)---左右选择添加删除内容菜单 选定一项或多项然后点击添加或移除(按住shift或ctrl可以多选),或在选择项上双击进行添加和移除。 ...

网页特效代码集合+实例

  • 2008年09月26日 10:46
  • 537KB
  • 下载

使整个网页变黑白色(灰色)的特效代码

全站CSS代码。 html { filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); } ...

网页特效代码

  • 2012年03月12日 09:17
  • 30KB
  • 下载

网页特效代码

  • 2011年12月03日 22:04
  • 56KB
  • 下载
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:网页特效代码备用录
举报原因:
原因补充:

(最多只允许输入30个字)