質問

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