📄 ch18-263.txt
字号:
<HTML>
<HEAD>
<TITLE>技巧篇--打开页面</TITLE>
</HEAD>
<BODY bgcolor="#fef4d2" >
<br><br>
<center>
<font color="ffaafa"><h2>技巧篇--打开页面</h2></font>
<hr width=300>
<br><br>
<!-- 案例代码开始 -->
<!-- [Step1]: 这里可以更改打开页面的背景色 -->
<style>
.intro{position:absolute;left:0;top:0;background-color:#00FF99;layer-background-color:red;border:0.1px solid red}
.pt9 { font-family: "宋体"; font-size: 9pt; text-decoration: none}
body { font-family: "宋体"; font-size: 9pt; text-decoration: none ; margin-top: 0px}
</style>
<div id="index1" class="intro"></div>
<div id="index2" class="intro"></div>
<script language=JavaScript>
var temp=new Array()
var temp2=new Array()
if (document.layers){
for (i=1;i<=2;i++){
temp[i]=eval("document.index"+i+".clip")
temp[i].width=window.innerWidth/2
temp[i].height=window.innerHeight
temp2[i]=eval("document.index"+i)
temp2[i].left=(i-1)*temp[i].width } }
else if (document.all){
var clipright=document.body.clientWidth/2,clipleft=0
for (i=1;i<=2;i++){
temp[i]=eval("document.all.index"+i+".style")
temp[i].width=document.body.clientWidth/2
temp[i].height=document.body.offsetHeight
temp[i].left=(i-1)*parseInt(temp[i].width) }
}
function StartOpenPage(){
<!-- [Step2]: 在此能够设置页面打开的速度 -->
stopit=setInterval("SetOpenPage()",100)
}
function SetOpenPage(){
window.scrollTo(0,0)
if (document.layers){
temp[1].right-=30
temp[2].left+=30
if (temp[2].left>window.innerWidth/2) clearInterval(stopit) }
else if (document.all){
clipright-=30
temp[1].clip="rect(0 "+clipright+" auto 0)"
clipleft+=30
temp[2].clip="rect(0 auto auto "+clipleft+")"
if (clipright<=0) clearInterval(stopit) }
}
StartOpenPage()
</script>
<!-- 案例代码结束 -->
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -