CSS如何设置文字显示两行
.text{ display: -webkit-box; word-break: break-all; text-overflow: ellipsis; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; /* 这里是超出几行省略 */ }
文章地址https://www.yii666.com/learning/web/171.html网址:yii666.com
CSS如何设置一行文字,超出隐藏
.text{ /*超出省略号*/ text-overflow: ellipsis; /*溢出隐藏*/ overflow: hidden; /*禁止换行*/ white-space: nowrap; }
文章来源地址:https://www.yii666.com/learning/web/171.html