How to have an animated header display in mobile too?

Hi everyone! Hopefully someone can help me.
A while ago I added an animated header to my website and now I’d like the same animated header to display in the mobile version too. Do I need to create a new code for it?
I’ve looked for a tutorial but couldn’t find anything about it.
Can anyone help me?

The question is too general. hat animation dot you have there? What are you trying to achieve?

Hey J.D. thank you for trying to help me!
Here you can see the animation I have:
https://www.youtube.com/watch?time_continue=189&v=7pIUxBnaOWA&feature=emb_title

Basically as you scroll down the page, the header goes from transparent to white and it displays the menu and the name of the website.
Do you know if there’s a way to get the same effect in the mobile version?

i am also looking for animated header for my mario game website

Charli, you mean like this one? → https://www.wix.com/corvid/example/sticky-header

You can do it on mobile as well using onViewportEnter and onViewportLeave

Ok, so I have to turn on Dev Mode on mobile and write another code like the one used in the desktop versions?