这就是background image looks like on the laptop
这是手机enter image description here上的背景图片
如您所见,背景没有正确对齐,我想在两者上看到完全相同的背景。
下面是我使用的cs代码,它无助于调整图像的大小,以至于我看到相同的背景图像:
body { 背景图片:url('https://www.hdwallpapersbook.com/wp-content/uploads/2017/05/Justice-League-Batman-Wonder-Woman-Aquaman.jpg');
background-attachment: fixed;
background-repeat: no-repeat;
背景位置:中心中心; 背景尺寸:封面;
}
答案 0 :(得分:0)
您可以尝试以下方法:
强制图像包含在容器中(这看起来很奇怪)
或弄乱了背景位置属性-因此,您看到的图像部分在容器中移动了
或查看适合对象的CSS属性:
或裁剪原始图像并创建新图像以用于仅移动视图。