1、文本超出顯示省略號
{
width:100%;/*一行代碼顯示省略號必須寫寬度,否則無效*/
height:24px;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
}
2、多行文本超出省略號:
{
height:36px;/*36px大概是兩行的高度,可自己調*/
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
3、強制英文換行
{
word-break:break-all;
}