这是效果图
这是html页面的代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>中国的流浪猫</title>
<style>
* {
margin: 0;
padding: 0;
}
.clearfix:after {
content: '';
display: block;
height: 0;
visibility: hidden;
clear: both;
}
.clearfix {
*zoom: 1;
}
.box {
width: 245px;
background: #ccc;
margin: 200px auto;
padding-top: 10px;
}
.box ul {
list-style: none;
}
.box ul li {
float: left;
width: 80px;
height: 30px;
border-right: 1px solid rgba(0, 0, 0, .3);
margin-bottom: 10px;
font-size: 16px;
line-height: 30px;
text-align: center;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.box ul li:nth-of-type(3n),
.box ul li:nth-last-of-type(1) {
border-right: none;
}
</style>
</head>
<body>
<div class="box">
<ul class="clearfix">
<li>测试</li>
<li>消失</li>
<li>边界线</li>
<li>右侧</li>
<li>边界线</li>
<li>消失</li>
<li>测试</li>
</ul>
</div>
</body>
</html>