1

是否可以在用户滚动网页时阻止图像移动。就像用户总是看到图像?我想可以使用 a 但我不知道如何。

4

2 回答 2

2

使用 cssposition: fixed;属性,指定topleft绝对属性。

于 2013-03-09T19:01:51.017 回答
0
body {
  background-image: url("http://yoursite.com/path/to/image.gif");
  background-position: 50% 50%;
  background-repeat: no-repeat;
}
于 2013-03-09T19:03:08.443 回答