<style>
.test_demo_clip{text-overflow:clip; overflow:hidden; white-space:nowrap; width:200px; background:#ccc;}
.test_ellipsis{text-overflow:ellipsis; overflow:hidden; white-space:nowrap; width:200px; background:#ccc;}
</style>
</head>
<body>
<!--省略号的方式显示文本-->
<div class="test_demo_clip">
不省略显示abcedfsafsafaaabcedfsafsafaaabcedfsafsafaaabcedfsafsafaaabcedfsafsafaaabcedfsafsafaaabcedfsafsafaa
</div>
<div class="test_ellipsis">
省略显示abcedfsafsafaaabcedfsafsafaaabcedfsafsafaaabcedfsafsafaaabcedfsafsafaaabcedfsafsafaaabcedfsafsafaa
</div>
注意:(
text-overflow:ellipsis; overflow:hidden; white-space:nowrap;
)这三个属性一定要一起使用。