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.
是否可以在用户滚动网页时阻止图像移动。就像用户总是看到图像?我想可以使用 a 但我不知道如何。
使用 cssposition: fixed;属性,指定top和left绝对属性。
position: fixed;
top
left
body { background-image: url("http://yoursite.com/path/to/image.gif"); background-position: 50% 50%; background-repeat: no-repeat; }