跟隨鼠標的半透明圖片
發(fā)布時間:2008-08-07 閱讀數(shù): 次 來源:網(wǎng)樂原科技
腳本說明:
把如下代碼加入<body>區(qū)域中
<STYLE type=TEXT/CSS>
.tm {
FILTER: Alpha(Opacity=50)
}
</STYLE>
<DIV id=Layer1 style="HEIGHT: 31px; LEFT: 409px; POSITION: absolute; TOP: 131px; WIDTH: 14px"><IMG class=tm src="girl0508.gif"></DIV>
<SCRIPT>
function move_layer()
{
Layer1.style.left=event.clientX+document.body.scrollLeft+10;
Layer1.style.top=event.clientY+document.body.scrollTop+10;
top.status="鼠標X="+event.clientX + " sX=" + document.body.scrollLeft + " 鼠標Y=" + event.clientY+ " sY=" + document.body.scrollTop;
}
document.onmousemove =move_layer;
</SCRIPT>