代码如下:
<style type="text/css">
#topnav{
height:36px;
background-color:silver;
border: 1px solid seagreen;
}
#topnav ul{
/*line-height:30px;*/
margin: 5px;
padding: 0px;
border-bottom: solid;
border-bottom-width: 2px;
border-bottom-color: darkgreen;
float :left;
}
#topnav li{
float: left;
padding: 4px;
list-style-type: none;/*去掉列表默认样式符号*/
width: 62px;/*主要是设置宽度,这样li宽度固定了才不会导致大小不一*/
height:20px;
text-align: center;
margin: 0px 0px 0px 5px;
background-image: url (nav/picture/normal.jpg);
background-repeat:no-repeat;
/*_zoom:1;*/
}
#topnav li a{
font-family:arial;
text-decoration:none;/*超链接的下划线去掉*/
}
#topnav li#select {
background-image: url (nav/picture/select.gif);
background-repeat :no-repeat;
}
</style>
</head>
<body>
<div id ="topnav">
<ul>
<li id="select"><a href ="#">jlajla</a></li>
<li><a href ="#">jlajla</a></li>
<li><a href ="#">jlajla</a></li>
<li><a href ="#">jlajla</a></li>
</ul>
</div>
</body>
</html>