标题太长,显示2行,多余的使用省略号

it2024-03-14  75

css 标题太长,显示2行,多余的使用省略号

小程序中使用

display: -webkit-box; overflow: hidden; text-overflow: ellipsis; word-wrap: break-word; white-space: normal !important; -webkit-line-clamp: 2; -webkit-box-orient: vertical;

pc端使用

text-overflow: -o-ellipsis-lastline; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;

css 强制不换行 多余的使用省略号

white-space:nowrap; text-overflow:ellipsis; overflow: hidden;

自动换行

word-wrap: break-word; word-break: normal;

英文单词断行

word-break:break-all;
最新回复(0)