<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns=" http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>1111</title>
<style>
ul{
font-family:"宋体";
font-size:14px;
font-weight:bold;
}
a {
color:#FFFFFF;
text-decoration: none;
}
a:hover {
color:#FFFFFF;
text-decoration: none;
}
a:active{
color: #FF0000;
text-decoration: none;
}
#menu{
height:30px;
width:915px;
margin-top:8px;
background:url(image/daohang.gif);
}
#menu ul{
width:915px; height:30px;
list-style-type:none; padding:0px; margin-top:0px; margin-bottom:0px;
margin-left:3px;
}
.m_li{
float:left; width:109px;text-align:center; margin-right:8px; margin-left:-2px; padding-top:8px;
}
.m_li a{
display:block; color:#FFFFFF; width:109px;
}
.m_li_a{
float:left; width:109px; text-align:center; padding-top:11px; font-weight:bold;
background-image:url(image/daohang2.gif);height:23px; margin-top:-3px; margin-right:-2px; margin-left:-2px;
}
.m_li_a a{
display:block; color:#FFFFFF width:109px;
}
</style>
<script type="text/javascript">
var def="1";
function mover(object){
//主菜单
var mm=document.getElementById("m_"+object);
mm.className="m_li_a";
//初始主菜单隐藏效果
if(def!=0){
var mdef=document.getElementById("m_"+def);
mdef.className="m_li";
}
}
function mout(object){
//主菜单
var mm=document.getElementById("m_"+object);
mm.className="m_li";
//初始主菜单
if(def!=0){
var mdef=document.getElementById("m_"+def);
mdef.className="m_li_a";
}
}
</script>
</head>
<body>
<div id="menu">
<ul>
<li id="m_1" class='m_li_a'><a href="#">财税首页</a></li>
<li id="m_2" class='m_li' onmouseover='mover(2);' onmouseout='mout(2);'><a href="#">政务公开</a></li>
<li id="m_3" class='m_li' onmouseover='mover(3);' onmouseout='mout(3);'><a href="#">网上办事</a></li>
<li id="m_4" class='m_li' onmouseover='mover(4);' onmouseout='mout(4);'><a href="#">公告中心</a></li>
<li id="m_5" class='m_li' onmouseover='mover(5);' onmouseout='mout(5);'><a href="#">法规中心</a></li>
<li id="m_6" class='m_li' onmouseover='mover(6);' onmouseout='mout(6);'><a href="#">财税文化</a></li>
<li id="m_7" class='m_li' onmouseover='mover(7);' onmouseout='mout(7);'><a href="#">专题宣传</a></li>
<li id="m_8" class='m_li' onmouseover='mover(8);' onmouseout='mout(8);'><a href="#">专题宣传</a></li>
</ul>
</div>
</body>
</html>
这是一个我像让鼠标移上去的时候能正常的显示这个图片,让这个图片作为鼠标移上链接时的背景变化!图片和文字的位置要在中间来!
大家帮我看看!