主页

css两个背景重合

2023-03-08 06:53PM

css让两个背景重合的方法:

首先创建一个HTML示例文件;

然后使用【background-image:url(图片地址), url(图片地址);】方式让两个背景图片重合显示即可; 在css中,可以使用background-image:url(图片地址),url(图片地址);来让两个背景图片重合显示 例如:

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://blog.csdn.net/weixin_30709043/article/details/119371494

返回>>

登录

请登录后再发表评论。

评论列表:

目前还没有人发表评论