Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的视差有问题。当我尝试一些视差背景教程时,它在高分辨率下无法正常工作。所以我用background-size: cover;
background-size: cover;
然后背景占据了我屏幕的整个空间,但是当我以某种分辨率(如 4:3 分辨率)调整窗口大小时,每个背景之间都有巨大的空间。我不知道为什么。
我使用本教程来向您展示问题。尝试调整窗口大小,您将看到这些空间。
解决方案是不要使用background-size: cover;您添加到CSS.
CSS
jsFiddle 演示
如果需要,请解释为什么它在高分辨率下无法正常工作。