//html
<div>測試顯示區域文字超出</div>
<p>超出部分隱藏超出部分隱藏超出部分隱藏超出部分隱藏超出部分隱藏</p>
//css
p{
width: 200px;
overflow: hidden; /*溢出隱藏*/
white-space: nowrap;/*不換行*/
text-overflow:ellipsis;/*超出部分文字以...顯示*/
border: 1px solid forestgreen;
}
//實現效果
//html
<div>測試顯示區域文字超出</div>
<p>超出部分隱藏超出部分隱藏超出部分隱藏超出部分隱藏超出部分隱藏</p>
//css
p{
width: 200px;
overflow: hidden; /*溢出隱藏*/
white-space: nowrap;/*不換行*/
text-overflow:ellipsis;/*超出部分文字以...顯示*/
border: 1px solid forestgreen;
}
//實現效果
Java word通過html設置樣式(Spire Docx) <dependencies> <!-- Apache POI dependency for Word --> <dependency>