您的位置:首页 > 其它

添加一个相对与窗口固定位子的浮动层

2005-05-12 01:03 288 查看
<div id="MyFavorite" style="position:absolute; left:40px; top:80px; width:100px; height:100px; z-index:25">
<table width="158" border="1" cellspacing="0" cellpadding="3" bgcolor="#dee3e7" bordercolordark="#FFFFFF" bordercolorlight="#336633">
<tr><td>
常去网站导航<br>
<a href="http://community.csdn.net ">CSDN社区</a><br>
<a href="http://www.codeproject.com" >CodeProject</a><br注意:国内老是很难访问<br>
<a href="http://www.codeguru.com ">CodeGuru</a><br这个比较容易访问<br>
<a href="http://www.windows.org ">wxWindows</a><br>
<a href="http://sourceforge.net ">Sourceforge.net</a><br>
<a href="http://www.vchelp.net/vchelp/index.asp ">VCHelp</a><br>
<a href="http://www.vckbase.com ">VCKBase</a>
</td></tr>
</table>
</div>
<script language=JavaScript>
function DivNoMoveInIE(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
}
setInterval('DivNoMoveInIE("MyFavorite",100,0)',1)
</script>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐