捌玖网络工作室's Archiver

admin 发表于 2009-6-7 19:19

跟随鼠标的图片代码

将以下代码分别加入到网页的<head>蓝色字体部分</head>和<body>黄色字体部分</body>区域,绿色代码表示跟随鼠标的图片,可以替换成自己的图片,注意路径一定要正确。
j5eNEu"w3y,u
JhvV:T1C T [b]<html>[/b]
%|U9pnm3t [b]<head>
nHk8RYz [/b]<meta http-equiv="Content-Type" content="text/html; charset=gb2312">m\ZlZ:c kle
<title>捌玖网络网页特效|[url]www.89w.org[/url]|---跟随鼠标的图片</title>,FwZ(GE-n \ A
[b][code]<script LANGUAGE="JavaScript">
vp:c E4O3v!s var newtop=02NV Q!TP K1g*a/V2xI
var newleft=0
C} ih B PK if (navigator.appName == "Netscape") {
%x7}fB6? x7g layerStyleRef="layer.";
:Y"f5~ml0{r layerRef="document.layers";
[%I$j^1mb styleSwitch="";BS!LoV%_!zI t.\0Y
}
+UN,R*U;NxYc else
,_*Ny*F9{ {5e7`X.x}
layerStyleRef="layer.style.";
Sw.O-Fbd5j layerRef="document.all";
4h7@R7ZY]$W%Y styleSwitch=".style";"^6RK!g j4N V
}3cqs{(H
function doMouseMove() {
J9NzCS]8lQ(g? layerName = 'iit'|*wW4[I5hdVM
eval('var curElement='+layerRef+'["'+layerName+'"]')
krY6?!kk eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"')3m,U){ F1\;sihHI
eval('curElement'+styleSwitch+'.visibility="visible"')s,HBlN/y$p5N
eval('newleft=document.body.clientWidth-curElement'+styleSwitch+'.pixelWidth')
,tB$D]LFU/?A7V!x eval('newtop=document.body.clientHeight-curElement'+styleSwitch+'.pixelHeight')/YQl6Y|Ox
eval('height=curElement'+styleSwitch+'.height')?3GX#c ]7V
eval('width=curElement'+styleSwitch+'.width')
0Ky,snm ~Z width=parseInt(width)5{px9`xg
height=parseInt(height)
.D7rW7TeAv if (event.clientX > (document.body.clientWidth - 5 - width))]7v r}%S-xI
{
\eOhP;Z{hp newleft=document.body.clientWidth + document.body.scrollLeft - 5 - width'I+dY%bJ
}
Nrh4sF^$u$o else
_`7?p q {c;uk:D8g"Z
newleft=document.body.scrollLeft + event.clientXG q3w9?2TH&v} c
}
(N%[1}1i Mf+Tdw3N eval('curElement'+styleSwitch+'.pixelLeft=newleft')Y/c7`[Y-|j1i'@
if (event.clientY > (document.body.clientHeight - 5 - height))gT%_ ^? {n]
{
D8}l s[ ~? newtop=document.body.clientHeight + document.body.scrollTop - 5 - heightldb;Avtd1Y3Q
}
#c7r e9D)Vx4D else2Z T1g_["Ua+Q
{*R I/h?4O2x
newtop=document.body.scrollTop + event.clientY
#XL[ TNa1`9S)Y4} }
_5CS`)~U eval('curElement'+styleSwitch+'.pixelTop=newtop')"nE4S[/E Xr/e9j%`
}
\j6o C z?5O document.onmousemove = doMouseMove;_1e0`OF6k}UQu
</script>M$U6q9|*S _ y|
[/code][/b]
_-J/},X [ [b]</head>[/b]
D.heh1e4Y{`z)]
Uc;U'a%K+^}L [b]<body>*{(FVO8Wg
[/b]<!-- 以下代码是设定此页的鼠标样式代码 -->;TT5|YJ[? c8@
[b][code]<script language="javascript">N%RS j e"F
if (navigator.appName == "Netscape") {
9F#|'Cy H\ }
!OlOo+C L&bHP elsex1`7S7@rb~'AL
{
(A!oB Ga6H5l/\ document.write('<div ID=OuterDiv>') b(W!?fD _.h6J
document.write('<img ID=iit src="images/flag.gif" STYLE="position:absolute;TOP:5pt;LEFT:5pt;Z-INDEX:10;visibility:hidden;">'),s#h n:xt bj.MU
document.write('</div>').lA:Px3R]3^
}
7A(l%x9s!ld7J </script>
C Y-r'w!xw,z+ei&MhF@ [/code][/b]G!G:W%]A
[b]</body>[/b]
fWr8pI$] [b]</html>[/b]

页: [1]
【捌玖网络】已经运行:


Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.