标题:给网页添加背景图片 html+css
项目场景:
给网页添加背景图片,网页缩小放大都不受影响 html+css
问题描述:
给网页添加背景图片,网页缩小放大都不受影响 ,
解决方案:
1.在html写入一个div盒子
<div class="bjimg"></div>
2.写css代码
.bjimg {position: fixed;top: 0;left: 0;width: 100%;height: 100%;min-width: 1000px;z-index: -10;zoom: 1;background-color: #fff;background-image: url(../image/timg.jfif) ;background-repeat: no-repeat;background-size: cover;-webkit-background-size: cover;-o-background-size: cover;background-position: center 0;}
3.在url里写入自己图片地址就好
效果
给字体添加背景图:
/luo1831251387/article/details/110774774