Can anybody help me please? Animation in a header

You can do it with a simple JS code and an extra CSS class

Create an additional CSS class that corrects the header at the top of the screen, change the background color, etc.

Then, add a simple JS code that adds the CSS class to the header.

Example here: https://jsfiddle.net/19bwe33x/12/

Pawon