Keep Side Navigation Fixed with Scrolling of page

后端 未结 3 1959
忘掉有多难
忘掉有多难 2021-02-06 12:45

I have a clients website - www.stagecraft.co.uk and they want the navigation on the hire pages (longer page) to still be there at when you scroll the page down. I\'ve had a quic

3条回答
  •  广开言路
    2021-02-06 13:09

    I would hesitate to use only jquery - I think it's really annoying when scrolling a page and a DIV "jumps" due to javascript updating the position of an element.

    I'd use position:fixed, and just move the position of the box to the top of the left side with javascript when scrolling down initially, and then leave it there. It's a sort of compromise.

提交回复
热议问题