在CSS中使用多个背景图片
如果想在背景中添加一张以上的图片怎么办?CSS3 中可以直接 指定多个背景路径,如下所示:
body { background-image: url(https://image.flaticon.com/icons/svg/748/748122.svg), url(https://images.unsplash.com/photo-1478719059408-592965723cbc?ixlib=rb-1.2.1&auto=format&fit=crop&w=2212&q=80); background-position: center, top; background-repeat: repeat, no-repeat; background-size: contAIn, cover; }
效果图:
完整示例地址:https://codepen.io/duomly/pen/eYpVoJR