1、圖片遮罩透明漸變
//html
<div class="bg-gradient">
<div class="pic"></div>
</div>
//css
.bg-gradient .pic {
background-image: linear-gradient(to top, #fff, transparent), url("0101.png");
background-position: center;
background-blend-mode: normal;
position: absolute;
height: 100%;
width: 600px;
right: 0;
}
2、改變第一個字符的樣式,不生效的情況下,加上塊狀元素
div:first-letter {font-size: 18rpx;}
3、文字超過顯示省略號
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;