我们都知道可以用 CSS 给 background 添加背景色和背景图:
background
background: #F00 url("pic.png") no-repeat; // 红色 背景图片 不重复
那么可以给元素设置两个或者多个背景图吗?答案是可以:
background: url("bg.png") no-repeat top center, url("pic.png") no-repeat bottom center;
这样就可以了。
本文分享自 作者个人站点/博客 前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。
本文参与 腾讯云自媒体分享计划 ,欢迎热爱写作的你一起参与!