要实现CSS背景图片全屏铺满自适应,可以使用以下方法:
body {
background-image: url("your-image.jpg");
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
body {
background-image: url("your-image.jpg");
background-size: 100% 100%;
background-repeat: no-repeat;
background-position: center;
}
body {
background-image: url("your-image.jpg");
background-size: contain;
background-repeat: no-repeat;
background-position: center;
}
请根据具体需求选择适合的方法。