css3如何控制首行空两格,然后只显示4行,多余的以...显示
认证高级PHP讲师
//首先缩进 text-indent:2em; //只显示4行 display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
p{ text-indent: 2rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
Only 4 lines are displayed: Boy, you are asking too much for CSS3!
Only 4 lines are displayed: Boy, you are asking too much for CSS3!