How do you make a div follow as you scroll?

前端 未结 6 1969
孤街浪徒
孤街浪徒 2020-12-23 16:33

I have a div on the left hand side which includes the business hours and weather. I would like that div to scroll down and up according to how the user scrolls. So it would

6条回答
  •  暖寄归人
    2020-12-23 16:45

    the position:fixed; property should do the work, I used it on my Website and it worked fine. http://www.w3schools.com/css/css_positioning.asp

提交回复
热议问题