<!DOCTYPE html>
<html>
<head>
<title> new document </title>
<meta name="author" content="xxx" />
<meta charset="utf-8"/>
<style type="text/css">
div{
width:100px;
height:100px;
border:1px solid red;
overflow:hidden;
word-break:break-all;
white-space:nowrap;/*不允许换行 只能在一行显示*/
text-overflow:ellipsis;/*注意必须结合 overflow:hidden; white-space:nowrap;一起使用*/
}
</style>
</head>
<body>
<div>congraduation congraduation congraduation congraduation congraduation fawegtewged</div>
</body>
</html>