Masters and all page

Hello.

I created a prototype where when you scroll down, the header becomes sticky and also tapers and becomes translucent. I overlayed the entire interaction on the page itself (creating a dynamic panel with 2 states).

How can I make this feature persist across all pages? For example, I create this header in Masters, and could it be duplicated while maintaining these functions?