复制代码代码如下:
<html>
<head>
<meta charset="utf-8"/>
<title>css截取字符串</title>
<style type="text/css">
li {width:240px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
</style>
</head>
<body>
<ul>
<li>css截取字符串 css截取字符串css截取字符串css截取字符串</li>
<li>css截取字符串 css截取字符串 css截取字符串 css截取字符串</li>
<li>css截取字符串css截取字符串css截取字符串css截取字符串css截取字符串</li>
<li>css截取字符串:css截取字符串 现css截取字符串场:css截取字符串 css截取字符串:css截取字符串 css截取字符串</li>
<li>css截取字符串 css截取字符串</li>
<li>css截取字符串 css截取字符串 css截取字符串</li>
<li>css截取字符串css截取字符串css截取字符串css截取字符串</li>
<li></li>
</li>
</body>
</html>