下面我們給大家介紹一下導航菜單html5代碼吧!希望大家可以在這裡學習!
<html>
<head>
<FCK:meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>超級酷的網頁導航菜單</title>
<STYLE>
<!--
.xmenu td{font-size:12px;font-family:verdana,arial;font-weight:none;color:#333333;border:1px solid #ffffff;background:#f6f6f6;filter:blendtrans(duration=0.5);cursor:hand;text-align:center;}
-->
</STYLE>
<script>
function attachXMenu(objid){
var tds=objid.getElementsByTagName('td');
for(var i=0;i<tds.length;i++){
with(tds[i]){
onmouseover=function(){
with(this){
filters[0].apply();
style.background='#3ea936'; //這是鼠標移上去時的背景顏色
style.border='1px solid #ffffff'; //邊框
style.color='#ffffff'; //文字顏色
filters[0].play();
}
}
onmouseout=function(){
with(this){
filters[0].apply();
style.background='#f6f6f6'; //這是鼠標離開時的背景顏色
style.border='1px solid #ffffff'; //邊框
style.color='#333333'; //文字顏色
filters[0].play();
}
}
}
}
}
</script>
</head>
<body>
<div align="center">
<table border="1" width="778" cellpadding="0" style="border-collapse: collapse" height="30" id="table4" bgcolor=#DBDBDB bordercolor="#DBDBDB" cellspacing="0">
<tr>
<td>
<div align="center">
<table class="xmenu" id="xmenu0" border="0" width="776" cellspacing="3" cellpadding="3" height="30" id="table5">
<tr>
<td onclick_fckprotectedatt="%20onclick%3D%22window.open(''%2C%20%20%20'_blank')%3B%22">首 頁</td>
<td onclick_fckprotectedatt="%20onclick%3D%22window.open('%2F'%2C%20%20%20'_blank')%3B%22">綜合特效</td>
<td onclick_fckprotectedatt="%20onclick%3D%22window.open(''%2C%20%20%20'_blank')%3B%22">菜單特效</td>
<td onclick_fckprotectedatt="%20onclick%3D%22window.open(''%2C%20%20%20'_blank')%3B%22">文本操作</td>
<td onclick_fckprotectedatt="%20onclick%3D%22window.open(''%2C%20%20%20'_blank')%3B%22">圖形特效</td>
<td onclick_fckprotectedatt="%20onclick%3D%22window.open(''%2C%20%20%20'_blank')%3B%22">圖形特效</td>
<td onclick_fckprotectedatt="%20onclick%3D%22window.open(''%2C%20%20%20'_blank')%3B%22">狀態欄類</td>
<td onclick_fckprotectedatt="%20onclick%3D%22window.open(''%2C%20%20%20'_blank')%3B%22">時間日期</td>
<td onclick_fckprotectedatt="%20onclick%3D%22window.open(''%2C%20%20%20'_blank')%3B%22">按鈕特效</td>
</tr>
</table><script>attachXMenu(xmenu0); //在上面這個table結束的地方執行事件動作的綁定, 這裡的這個xmenu0就是那個table的id</script>
</div>
</td>
</tr>
</table>
</div>
</body>
</html>
以上就是我們給大家介紹的導航菜單html5代碼了。希望大家繼續關注我們的網站!