单行文本超出隐藏:html
在这里插入代码片 overflow: hidden; text-overflow:ellipsis; white-space: nowrap;
多行文本超出隐藏:web
其余多行溢出隐藏方法:思路///能够考虑用… + 定位来实现////先给定高度后,在after后面添加... + 定位的方法实现假的多行隐藏效果////多行溢出隐藏无非就是用户看不见全貌,能够经过这个思路在这里插入代码片 overflow:hidden;/*超出隐藏*/ text-overflow:ellipsis;/*文本溢出时显示省略标记*/ display:-webkit-box;/*设置弹性盒模型*/ -webkit-line-clamp:3; -webkit-box-orient:vertical;/*子代元素垂直显示*/ 改方法只能在本地使用,能够尝试在后面加上下面俩行代码试试 /*! autoprefixer: off */ /*autoprefixer: on */