设置广告栏边框
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8">
<style type="text/css" >
* {
padding: 0;
margin: 0;
}
ul {
list-style: none;
width: 510px;
margin-left: -1px;
}
li {
float: left;
width: 100px;
/* width: 98px;
padding: 0 1px; 方法二*/
height: 40px;
text-align: center;
cursor: pointer;
font: 400 18px/40px "SimSun";
}
li:hover {
font-weight: 700;
color: #f40;
/* padding: 0; 方法二*/
/* width: 98px; 方法三*/
border-left: 1px solid #000;
border-right: 1px solid #000;
}
.box {
width: 500px;
height:400px;
margin: 100px auto;
border: 1px solid #ccc;
overflow: hidden;
}
</style>
</head>
<body>
<div class="box">
<ul>
<li>公告</li>
<li>规则</li>
<li>规则</li>
<li>公告</li>
<li>公告</li>
</ul>
</div>
</body>
</html>