like "..."
Add CSS
.news {padding:40px; width:400px;}
.news .title {margin-bottom:10px; padding-bottom:8px; font-size:18px; border-bottom:2px solid #999;}
.news ul li {overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.news ul li + li {margin-top:8px;}
.news ul li a {color:#444; font-size:13px; text-decoration:none;}
.news ul li a:hover {text-decoration:underline;}
or
/*
display:-webkit-box;
word-wrap:break-word;
-webkit-line-clamp:3;
-webkit-box-orient:vertical;
overflow:hidden;
text-overflow:ellipsis;
height:54px;
*/
or
.news {padding:40px; width:500px;}
.news .title {margin-bottom:10px; padding-bottom:8px; font-size:18px; border-bottom:2px solid #999;}
.news ul {zoom:1;}
.news ul:after {display:block; content:""; clear:both;}
.news ul li {float:left; margin-bottom:14px; padding:15px; width:48%; border:1px solid #999;
box-sizing:border-box;}
.news ul li:nth-child(2n) {float:right;}
.news ul li a {display:-webkit-box; word-wrap:break-word; -webkit-line-clamp:3;
-webkit-box-orient:vertical; overflow:hidden; text-overflow:ellipsis; height:54px;
line-height:18px; color:#444; font-size:13px; text-decoration:none;}
No comments:
Post a Comment