先上效果图。
样式:
.board {
width: 414px;
height: 210px;
padding: 12px 16px;
background: url(../../../../assets/images/process/01.jpg) right bottom
no-repeat,
linear-gradient(135deg, #fff1eb, #ffe4e0);
background-size: auto 50%;
border-radius: 4px;
&:nth-child(2) {
background: url(../../../../assets/images/process/bgpic_money.png) right
bottom no-repeat,
linear-gradient(135deg, #e9f3ff, #c5dcff);
}
&:nth-child(3) {
background: url(../../../../assets/images/process/bgpic_money.png) right
bottom no-repeat,
linear-gradient(135deg, #fff6f1, #ffddc5);
}
&:nth-child(4) {
background: url(../../../../assets/images/process/bgpic_money.png) right
bottom no-repeat,
linear-gradient(135deg, #fbf8fd, #f1e6fa);
}
- linear-gradient() 和 url() 中间必须用
逗号
隔开。- linear-gradient() 放在 url() 后,否则样式冲突没有效果。
- 图片格式:edge/Chrome 浏览器支持 png/jpg/jpeg,只测了这么些,并不局限于 png。
大概就是这些了,有问题欢迎反馈!