css3文本如何控制首行空两格,然后只显示4行,多余的以...显示
PHP中文网
PHP中文网 2017-04-17 11:48:01
0
2
447

css3如何控制首行空两格,然后只显示4行,多余的以...显示

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(2)
迷茫
//首先缩进
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!

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template