<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>over-flow(溢出)</title>
<style>
li{
width: 100px;
height: 20px;
background-color: #87CEEB;
border: 1px solid #000;
white-space:nowrap;
overflow:hidden;
text-overflow: ellipsis;
}
.c1{
width: 100px;
height: 20px;
background-color: #87CEEB;
border: 1px solid #000;
/*折行*/
/*white-space: normal;*/
overflow:hidden;
/*文字有溢出,可用ellipsis实现省略。*/
text-overflow: ellipsis;
}
</style>
</head>
<body>
<div class="c1">asdfghjklasdfghjklasdffghjklasdfghjkl</div>
<ur>
<li>北三环大明宫建材家居博览中心 qwer tyui opas dfgh jklz xcvb nm</li>
<li>北三环大明宫建材家居博览中心qwertyuiopasdfghjklzxcvbnm</li>
<li>北三环大明宫建材家居博览中心qwertyuiopasdfghjklzxcvbnm</li>
<li>北三环大明宫建材家居博览中心qwertyuiopasdfghjklzxcvbnm</li>
<li>北三环大明宫建材家居博览中心qwertyuiopasdfghjklzxcvbnm</li>
<li>北三环大明宫建材家居博览中心qwertyuiopasdfghjklzxcvbnm</li>
<li>北三环大明宫建材家居博览中心qwertyuiopasdfghjklzxcvbnm</li>
<li>北三环大明宫建材家居博览中心qwertyuiopasdfghjklzxcvbnm</li>
<li>北三环大明宫建材家居博览中心qwertyuiopasdfghjklzxcvbnm</li>
<li>北三环大明宫建材家居博览中心qwertyuiopasdfghjklzxcvbnm</li>
</ur>
</body>
</html>