幻影方格
1.把<body>改为<body onload="setInterval('gs9768()',50)" >
加入如下代码到head区域 <!-- 設定方格邊線顏色及寬度 --> <STYLE type=text/css> .gs1 { border:1 solid #0000FF ; VISIBILITY:hidden ; POSITION:absolute } .gs2 { border:1 solid #00CCFF ; VISIBILITY:hidden ; POSITION:absolute } .gs3 { border:1 solid #99FFCC ; VISIBILITY:hidden ; POSITION:absolute } .gs4 { border:1 solid #00FF00 ; VISIBILITY:hidden ; POSITION:absolute } .gs5 { border:1 solid #CCFF33 ; VISIBILITY:hidden ; POSITION:absolute } .gs6 { border:1 solid #FFFF00 ; VISIBILITY:hidden ; POSITION:absolute } .gs7 { border:1 solid #FFCC00 ; VISIBILITY:hidden ; POSITION:absolute } .gs8 { border:1 solid #FF9900 ; VISIBILITY:hidden ; POSITION:absolute } .gs9 { border:1 solid #FF6600 ; VISIBILITY:hidden ; POSITION:absolute } .gs10 { border:1 solid #FF0000 ; VISIBILITY:hidden ; POSITION:absolute } </STYLE> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin var i = 0 function moveCursor() { ++i if(i == 10) { i = 0 } cursor.item(i).style.pixelLeft = event.clientX - cursor.item(i).style.pixelWidth/2 cursor.item(i).style.pixelTop = event.clientY - cursor.item(i).style.pixelHeight/2 cursor.item(i).style.visibility = "visible" } document.onmousemove = moveCursor var j = 0 function gs9768() { ++j if(j == 10) { j = 0 } if(cursor.item(j).style.visibility == "visible") { cursor.item(j).style.visibility = "hidden" } } // End --> </SCRIPT>
加入如下代码到body区域 <!-- 設定方格大小 --> <DIV class=gs1 id=cursor style="WIDTH: 110px; HEIGHT: 110px"></DIV> <DIV class=gs2 id=cursor style="WIDTH: 100px; HEIGHT: 100px"></DIV> <DIV class=gs3 id=cursor style="WIDTH: 90px; HEIGHT: 90px"></DIV> <DIV class=gs4 id=cursor style="WIDTH: 80px; HEIGHT: 80px"></DIV> <DIV class=gs5 id=cursor style="WIDTH: 70px; HEIGHT: 70px"></DIV> <DIV class=gs6 id=cursor style="WIDTH: 60px; HEIGHT: 60px"></DIV> <DIV class=gs7 id=cursor style="WIDTH: 50px; HEIGHT: 50px"></DIV> <DIV class=gs8 id=cursor style="WIDTH: 40px; HEIGHT: 40px"></DIV> <DIV class=gs9 id=cursor style="WIDTH: 30px; HEIGHT: 30px"></DIV> <DIV class=gs10 id=cursor style="WIDTH: 20px; HEIGHT: 20px"></DIV>