<分区>
编辑问题以包含 desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem .这将有助于其他人回答问题。
关闭 7 年前。
<分区>
编辑问题以包含 desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem .这将有助于其他人回答问题。
关闭 7 年前。
我在将背景图片定位到“底部”时遇到问题。当我尝试将其位置设置为底部时,它实际上将我的图像向上移动到顶部,这样上部就被切断了。我正在寻找可能导致此问题的原因,并看到有人提到“jQuery 将 bottom 设置为 0”。 (发现here actually)
这甚至发生在这个 simple test editor 上让我不知所措。
有没有人熟悉这个以及如何解决它?
最佳答案
这是一种视错觉,因为 body 的高度太小,无法正确观察到变化。将其添加到 body CSS 中,您将看到实际位置,尝试使用 body 背景图像位置的不同变化
border: solid red 2px;
margin:0px;
height:500px;
关于jQuery 干扰 CSS 背景图片位置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33068726/