URGENT HELP NEEDED with Header Properties

Can someone help me with this???
I am building my hospital’s website and need a menu animation like this:
Can someone help me with code please? Any ideas? I tried modifying Code Queen’s Shrinking header effect, but I can’t seem to find the header properties (on viewport enter and leave).
Can someone help me as to where can I locate these properties?

Can you post the CQ youtube link here? and what code you tried? Can you post it here?

To select an element that is hard to select, please use the Layers tool (just like photoshop) to choose it: https://support.wix.com/en/article/wix-editor-using-the-layers-panel