<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
* {
margin: 0;
padding: 0;
}
/*裁剪右边和底部边框,需要container宽度小于实际宽度,但是必须设置ul宽度大于单行宽度*/
.container {
margin: 60px auto 0;
width: 1048px;
height: 240px;
overflow: hidden;
}
/*宽度单行需要能够容纳五个li 210 * 5 = 1055*/
.container ul {
width: 1055px;
}
.container li {
width: 210px;
height: 65px;
float: left;
list-style: none;
border-right: 1px dashed #ccc;
border-bottom: 1px dashed #ccc;
line-height: 80px;
text-align: center;
padding-top: 15px;
}
</style>
</head>
<body>
<div class="container">
<ul>
<li>
<a href="#">
<img src="images/tb.png" height="40" width="103"/></a>
</li>
<li>
<a href="#">
<img src="images/tb.png" height="40" width="103"/></a>
</li>
<li>
<a href="#">
<img src="images/tb.png" height="40" width="103"/></a>
</li>
<li>
<a href="#">
<img src="images/tb.png" height="40" width="103"/></a>
</li>
<li>
<a href="#">
<img src="images/tb.png" height="40" width="103"/></a>
</li>
<li>
<a href="#">
<img src="images/tb.png" height="40" width="103"/></a>
</li>
<li>
<a href="#">
<img src="images/tb.png" height="40" width="103"/></a>
</li>
<li>
<a href="#">
<img src="images/tb.png" height="40" width="103"/></a>
</li>
<li>
<a href="#">
<img src="images/tb.png" height="40" width="103"/></a>
</li>
<li>
<a href="#">
<img src="images/tb.png" height="40" width="103"/></a>
</li>
<li>
<a href="#">
<img src="images/tb.png" height="40" width="103"/></a>
</li>
<li>
<a href="#">
<img src="images/tb.png" height="40" width="103"/></a>
</li>
<li>
<a href="#">
<img src="images/tb.png" height="40" width="103"/></a>
</li>
<li>
<a href="#">
<img src="images/tb.png" height="40" width="103"/></a>
</li>
<li>
<a href="#">
<img src="images/tb.png" height="40" width="103"/></a>
</li>
</ul>
</div>
</body>
</html>
网友评论