How do I create a website menu bar like this?

Apple iPhone 7 Page
If you keep scrolling, you'll see that the menu bar sticks and the design is very nice (and it has a defined border).
How can I do something like this? I've tried lists with CSS, but they look horrible compared to this?