Skip to content
On this page

单行省略号

css
.singe-line {
   text-overflow: ellipsis;
   overflow: hidden;
   word-break: break-all;
   white-space: nowrap;
 }

元素textContent支持换行符换行

css
p {
    white-space:pre-wrap;
}