<html>
<head>
<style>
#div1{
width:960px
height:30px
}
#div1 ul li{
float:left
width:60px
height:30px
border-right:1px solid
}
</style>
</head>
<body>
<div id='div1'>
<ul>
<li>muli1</li>
<li>muli1</li>
<li>muli1</li>
<li>muli1</li>
</ul>
</div>
</body>
</html>
在CSS里设置导航的分割线,首先,一般做导航条,都是通过ul、li来做,将ul包裹在一个div中,然后设置好width和height,分隔线,换个理解,给li一个右边的边框就可以了,通过代码来理解:
<html><head>
<style>
#div1{
width:960px
height:30px
}
#div1 ul li{
float:left
width:60px
height:30px
border-right:1px solid
}
</style>
</head>
<body>
<div id='div1'>
<ul>
<li>muli1</li>
<li>muli1</li>
<li>muli1</li>
<li>muli1</li>
</ul>
</div>
</body>
</html>