任何用jquery修复图像位置的方法
我将图像放在特定位置,例如,
img {
position:absolute;
top:150px;
}
是否可以通过文本滚动来滚动图像,以便图像始终保持在相对于屏幕的相同位置。
我不想使用固定位置
I have the image at specific position e,g
img {
position:absolute;
top:150px;
}
Is there any to scroll the image with text scrolling so that image always stays at same position with respect to screen.
I don't want to use position fixed
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要给它
固定
位置:然后相应地调整
top
和left
值。不需要 jQuery,但如果你仍然想要,你可以这样做:
You need to give it
fixed
position:And then adjust the
top
andleft
values accordingly.No need for jQuery but if you still want, you can do like: