문제

I'm building a small personal website and would like to know how to make a sticky menu in HTML/CSS And JS without using JQuery (because I don't want to include it for such a small use) like this one

Thanks :)

도움이 되었습니까?

해결책

I assume with 'sticky' you mean a mean staying on top (over) your content and being visible regardless of view port (scrolling state). This can be done by using position: fixed; top: 0; left: 0; with: 100% on the menu's container. The important thing is position: fixed; it makes sure the menu stays where it is...

Did I guessed this correct?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top