我有这张背景图片。它可以正常工作,并且可以在台式机和平板电脑上正确地垂直填满整个屏幕。但是,当它开始移动时,它开始缩小尺寸并穿上这些讨厌的白条。
这是CSS:
html {
/* The image used */
background-image: url("../../assets/imgs/MenuBackground1.png");
/* Full height */
height: 100%;
/* Center and scale the image nicely */
background-position: center;
background-repeat: no-repeat;
background-size: cover;
background-attachment: fixed;
}
答案 0 :(得分:0)
尝试将背景大小更改为100%