body {
background-image:
linear-gradient(to bottom, rgba(0,0,0, 0.1), rgba(0,0,0, 1)),
url(img/bg.jpg);
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
}
这样的 css3 可以把 background-image
分开写吗?
比如,覆盖 body 规则,同时又保留 linear-gradient
body.cover {
background-image: url(img/other.jpg);
/* 同时保留 linear-gradient(to bottom, rgba(0,0,0, 0.1), rgba(0,0,0, 1)) */
}