
[英]javascript/jQuery – Keep a div scrolled to the bottom while resizing the page vertically?
[英]How to keep a div stuck in the same spot while the rest of page is scrolled?
例如: http : //www.ehow.com/how_2196172_ping-mac-computer.html
你可以看到“有用吗?” 即使滚动页面的其余部分,元素也会卡在原位。 我不确定这是否只能用css或需要js(最好是jQuery)来完成。 如何才能做到这一点?
你必须修复元素位置。 尝试这样的事情:
div#ID { position: fixed; bottom:10px; left:10px; }
希望能帮助到你!
这是使用position: fixed
,它相对于浏览器视图端口定位元素。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.