<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>text-overflow案例在线演示</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
#a{white-space: nowrap}
#divcss5 li{width:300px;
overflow:hidden;text-overflow:ellipsis;
</style>
<!-- 有两种不允许换行的方式 white-space;nobr html标签 -->
</head>
<body>
<ul id="divcss5">
<li id="a">#8226; 显示不完显示省略号,测试内容</li>
<li><nobr>#8226; 第二排测试内容超出显示省的信息</nobr></li>
<li><a href="#"><nobr>#8226; 能显示完几个字测试省略的使用</nobr></a></li>
</ul>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>text-overflow案例在线演示</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
#a{white-space: nowrap}
#divcss5 li{width:300px;
overflow:hidden;text-overflow:ellipsis;
</style>
<!-- 有两种不允许换行的方式 white-space;nobr html标签 -->
</head>
<body>
<ul id="divcss5">
<li id="a">#8226; 显示不完显示省略号,测试内容</li>
<li><nobr>#8226; 第二排测试内容超出显示省的信息</nobr></li>
<li><a href="#"><nobr>#8226; 能显示完几个字测试省略的使用</nobr></a></li>
</ul>
</body>
</html>