固定位置的链接导航

来自「网页特效」· 代码 · 共 27 行

TXT
27
字号
<div id="KBStatic" style="position:absolute; left:3px; top:0px; width:553px; height:70px; z-index:25"> 
<a href="http://lovehy.126.com" title="这个文字链接固定在260:185处">水晶情缘</a></div>
                  <script language=JavaScript>
function KB_keepItInIE(theName,theWantTop,theWantLeft) {
theRealTop=parseInt(document.body.scrollTop)
theTrueTop=theWantTop+theRealTop
document.all[theName].style.top=theTrueTop
theRealLeft=parseInt(document.body.scrollLeft)
theTrueLeft=theWantLeft+theRealLeft
document.all[theName].style.left=theTrueLeft
}
function KB_keepItInNN(theName,theWantX,theWantY) {
theRealLay=document.layers[theName]
theBadX=self.pageYOffset
theBadY=self.pageXOffset
theRealX=theBadX+theWantX
theRealY=theBadY+theWantY
theRealLay.moveTo(theRealY,theRealX)
}
IE4=(document.all)?1:0
NN4=(document.layers)?1:0
if (IE4)
setInterval('KB_keepItInIE("KBStatic",260,185)',1)
if (NN4)
setInterval('KB_keepItInNN("KBStatic",260,185)',1)
</script>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?