Home>Article>Web Front-end> Share text overflow hiding examples
Before, when writing pages, I used single-line text overflow hiding. Today I encountered multi-line text overflow hiding, and used ellipsis for the overflow part. I sorted it out by reviewing some information and shared it with you.
Overflow hiding of single line text
For overflow hiding of single line text, text-overflow: ellipsis can be a perfect solution, but when using it, you must combineoverflow: hiddenandwhite- space: nowrap;, I sometimes forget to write it, so the effect cannot be produced, and it takes me a long time to find it.
1 2 3 4 5单行文本溢出隐藏 6 16 17 1819
凭借专业的精神、优质的团队、周到的服务,东方卓越现已成为众中国银行业协会、中国航空运输协会、 中国工商银行、中国建设银行、凤凰网、联想(北京)、中国人保等知名企业的合作伙伴,服务领域涵盖金融证券、 汽车产业、时尚传媒、互联网、地产家居、旅游娱乐等重点领域。
20 21 22 23
Effect:
## 
Overflow hiding of multi-line text
I amUse pseudo-class tags
1 2 3 4 5多行文本溢出隐藏 6 25 26 2728 凭借专业的精神、优质的团队、周到的服务,东方卓越现已成为众中国银行业协会、 中国航空运输协会、中国工商银行、中国建设银行、凤凰网、联想(北京)、中国人保等知名企业的合作伙伴, 服务领域涵盖金融证券、汽车产业、时尚传媒、互联网、地产家居、旅游娱乐等重点领域。凭借专业的精神、优质的团队、 周到的服务,东方卓越现已成为众中国银行业协会、中国航空运输协会、中国工商银行、中国建设银行、凤凰网、 联想(北京)、中国人保等知名企业的合作伙伴,服务领域涵盖金融证券、汽车产业、时尚传媒、互联网、地产家居、 旅游娱乐等重点领域。 29
30 31
Effect:

Friends, if you have any better method, please share it!
The above is the detailed content of Share text overflow hiding examples. For more information, please follow other related articles on the PHP Chinese website!