您知道如何使用 多个背景 吗?
body {
background-image:
url(image-one.jpg),
url(image-two.jpg);
}
这仅仅是 background-image
。正如您所料,您也可以设置它们的位置。我们将使用简写形式
body {
background:
url(image-one.jpg) no-repeat top right,
url(image-two.jpg) no-repeat bottom left;
}
我只是为了好玩而偷偷加入了 background-repeat
。不过,您可能不会想到为多个不同的背景设置 background-clip
。在 这篇链接文章 中,Stefan Judis 指出,这解锁了一些非常棒的 CSS 技巧!