![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
CSS
文章平均质量分 60
Headmaster_Tan
菜鸟
展开
-
实现多行文本溢出自定义省略符,以及展开和收起
参考自:https://juejin.cn/post/6979043372233621518 没有废话只有代码(参考文章说的很明白了),即拷即用 <!DOCTYPE html> <html lang="en"> <head> <title>Document</title> <style> .box { position: relative; margin: 50px;原创 2022-04-25 19:04:26 · 498 阅读 · 0 评论 -
控制文本超过N行后加上省略号隐藏
单行文本隐藏 .single-line-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } 多行文本隐藏 .multiple-line-text { display: -webkit-box; overflow: hidden; text-overflow: ellipsi...原创 2018-12-10 11:21:16 · 242 阅读 · 0 评论