text-overflow : clip | ellipsis
text-overflow : clip | ellipsis
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta
http-equiv="Content-Type" content="text/html; charset=utf-8"
/>
<title>text-overflow</title>
</head>
<body>
<style
type="text/css">
.test_demo_clip{text-overflow:clip; overflow:hidden;
white-space:nowrap; width:200px; background:#ccc;}
.test_demo_ellipsis{text-overflow:ellipsis; overflow:hidden; white-space:nowrap;
width:200px; background:#ccc;}
</style>
<h2>text-overflow :
clip </h2>
<div
class="test_demo_clip">
不显示省略标记,而是简单的裁切条
</div>
<h2>text-overflow
: ellipsis </h2>
<div
class="test_demo_ellipsis">
当对象内文本溢出时显示省略标记
</div>
</body>
</html>
text-overflow 文字溢出时的设置,布布扣,bubuko.com
原文:http://www.cnblogs.com/huntaheart/p/3593442.html