开发者

Div's margin-top stays 20px when scrolling

I want the div on the right side of this page to stop scrolling up when you scroll down the page. So that it is always 20px from the top of the window and the customer can read it's contents.开发者_Python百科

How can I achieve that? CSS? jQuery?

Thanks


jQuery. Do an on scroll event, and when scroll height gets past a certain point, make the div position:fixed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜