首页 > 代码库 > 始终固定底部菜单

始终固定底部菜单

<html>
<head>
<title>阿里西西网页特效演示,始终固定底端导航菜单</title>
</head>
<body onl oad="fix()" onScroll="fix()" onResize="fix()">
<!--用<body onl oad=‘fix()‘ onScroll="fix()" onResize="fix()">替换<body> -->
<!--将以下代码加入HTML的<Body></Body>之间-->
<script language="javascript">
<!--
function stat(){
var a = pageYOffset+window.innerHeight-document.bar.document.height-15
document.bar.top = a
setTimeout(‘stat()‘,2)
}
function fix(){
nome=navigator.appName
if(nome==‘Netscape‘){
stat()
}
else{
var a=document.body.scrollTop+document.body.clientHeight-document.all.bar.offsetHeight+15
bar.style.top = a
}}
//-->
</script>
<span id="bar" style="position:absolute; left:68px; top:455px; width:614px; height:45px; z-index:9">
<table align="center" border="1" hspace="1" cellpadding="1" bordercolor="#000000" bgcolor="#FFFFFF">
<tr align="center">

<td>
<a href="http://www.mamicode.com/#">网页特效</a></td>
<td>
<a href="http://www.mamicode.com/#">文章教程</a></td>
</tr></table></span>
</body></html>
<a href="http://www.alixixi.com/Dev/HTML/jsrun/">欢迎访问阿里西西网页特效集</a>