<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<style type="text/css">
<!--
div {
width:300px;
border:1px solid red;
padding:10px;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
}
-->
</style>
<div id="ff">小日本爱吃鸡,打死小日本,这个样式不就很好嘛哈哈。</div>
转载于:https://blog.51cto.com/ylj798/1063372