Make a specific row in the header sticky

Hi, I have a few elements in the header, and what I want to happen is that when I scroll up, I want the gray area (where the menu is) to be sticky, but the rest should disappear like what it does in this website