語法展示::  http://home.graffiti.net/swdffdgd/


請用IE6.0或更新版本觀看語法特效展示

將以下程式碼複製,貼在<body>及</body>標籤之間。


<div id="i1" class="intro" style="background:url(11905510852.jpg); border: 1px none"></div>
<script language="JavaScript1.2">
<!--
var speed=20
if (document.layers){
var reference=window.innerWidth/window.innerHeight
var temp=eval("document.i1.clip")
temp.left=temp.top=0
temp.right=window.innerWidth
temp.bottom=window.innerHeight
}
else if (document.all){
var reference=document.body.clientWidth/document.body.clientHeight
var rightclip,leftclip,topclip,bottomclip
var temp=document.all.i1.style
topclip=leftclip=0
rightclip=temp.width=document.body.clientWidth
bottomclip=temp.height=document.body.clientHeight
}
function doit(){
window.scrollTo(0,0)
if (document.layers){
if (temp.left>window.innerWidth/2)
clearInterval(stopit)
temp.left+=reference*speed
temp.top+=speed
temp.right-=reference*speed
temp.bottom-=speed
}
else if (document.all){
if (leftclip>document.body.clientWidth/2)
clearInterval(stopit)
temp.clip="rect( "+topclip+" "+rightclip+" "+bottomclip+" "+leftclip+")"
leftclip+=reference*speed
topclip+=speed
rightclip-=reference*speed
bottomclip-=speed
}
}
stopit=setInterval("doit()",100)
-->
</script>


(11905510852.jpg) 中修改四方的底圖
var speed=20 中修改特效的速度


將以下程式碼複製,貼在<head>及</head>標籤之間。

<style>
<!--
.intro{
position:absolute;
left:0;
top:0;
}
-->
</style>

arrow
arrow
    全站熱搜

    eeredqq 發表在 痞客邦 留言(0) 人氣()