<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="content-type" content="text/htmlcharset=utf-8" />
<title>css各种分割线</title>
<style>
body
{
text-align:center
}
.split-line1
{
border-top:solid 1px #999
width:100%
padding:20px 0px
margin-top:20px
}
.split-line2
{
border-top:dashed 1px #999
width:100%
padding:20px 0px
margin-top:20px
}
.split-line3
{
border-top:dotted 1px #999
width:100%
padding:20px 0px
margin-top:20px
}
.split-line4
{
border-top:double 6px #999
width:100%
padding:20px 0px
margin-top:20px
}
</style>
</head>
<body>
第一部分内容
<div class="split-line1">
实线分割线
</div>
<div class="split-line2">
虚线分割线
</div>
<div class="split-line3">
点状分割线
</div>
<div class="split-line4">
双线分割线
</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>