?? ch18-262.html
字號:
<HTML>
<HEAD>
<TITLE>技巧篇--頁面縮放</TITLE>
</HEAD>
<BODY bgcolor="#fef4d2" >
<br><br>
<center>
<h2>技巧篇--頁面縮放</h2>
<hr width=300>
<br><br>
<!-- 案例代碼開始 -->
<!-- [Step1]: 這里可以更改縮放頁面的背景色 -->
<style>
.intro{position:absolute;left:0;top:0;background-color:#FFCCCC;layer-background-color:white;border:0.1px solid #FF99CC}
</style>
<div id="minpage" class="intro"></div>
<script language=JavaScript>
if (document.layers){
var reference=window.innerWidth/window.innerHeight
var temp=eval("document.minpage.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.minpage.style
topclip=leftclip=0
rightclip=temp.width=document.body.clientWidth
bottomclip=temp.height=document.body.clientHeight
}
function Reducewindow(){
window.scrollTo(0,0)
if (document.layers){
if (temp.left>window.innerWidth/2)
clearInterval(stopit)
temp.left+=reference*5
temp.top+=5
temp.right-=reference*5
temp.bottom-=5 }
else if (document.all){
if (leftclip>document.body.clientWidth/2)
clearInterval()
temp.clip="rect( "+topclip+" "+rightclip+" "+bottomclip+" "+leftclip+")"
leftclip+=reference*5
topclip+=5
rightclip-=reference*5
bottomclip-=5 }
}
<!-- [Step2]: 在此能夠設置頁面縮放的速度 -->
setInterval("Reducewindow()",100)
</script>
<!-- 案例代碼結束 -->
</BODY>
</HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -