Yes, you can change the background color of a fixed navbar in Webflow when a visitor starts scrolling. Here's how you can achieve this effect:
1. First, make sure you have a fixed navbar element on your page. You can add a navbar component by dragging and dropping it from the "Components" panel on the left side of the editor.
2. With the navbar selected, go to the Style panel on the right side of the editor. By default, the background color of the navbar might be set to transparent. You can change this initial color to the desired background color for the non-scrolling state.
3. Now, to change the background color of the navbar when a visitor starts scrolling, you'll need to add some custom interactions. Go to the Interactions panel located on the top right corner of the editor.
4. Click the "+ New Interaction" button to create a new interaction. Give it a name that represents its purpose, like "Change Navbar Background Color on Scroll".
5. In the Interaction panel, you'll see two tabs: "Scroll" and "Triggers". Click on the "Triggers" tab.
6. Under the "Scroll" section, you'll find two trigger options: "While Page Is Scrolling" and "While Page Is Scrolling in View". Choose the one that suits your needs best. If you want the background color change to happen as soon as the visitor starts scrolling, select "While Page Is Scrolling". If you prefer the change to happen only when the navbar is in view, choose "While Page Is Scrolling in View".
7. With the trigger selected, scroll down to the "Affect Different Elements" section. Here, you'll specify which elements you want to target and what changes you want to apply to them.
8. Click the "+ Add an Action" button and select "Element actions".
9. Choose the navbar element as the target element.
10. In the "Affect" dropdown menu, select "Background" to change the background color of the navbar.
11. Lastly, set the desired background color for the scrolling state in the "Value" field.
That's it! Now, when a visitor starts scrolling, the background color of the fixed navbar will change as per your specified settings in the interactions. You can preview the effects by clicking the "Preview" button at the top of the editor. Remember to publish your changes to make them live on your published site.