How to Change Background Color On Scroll in WordPress?

Key Takeaways

  • Nexter Blocks allows users to change the background color of a section on scroll in WordPress using the Container block.
  • The Container block includes two options for background color change effects: Gradient Like Effect and Direct Color Change Effect.
  • Users can set the animation duration for the Gradient Like Effect in the Transition Duration (s) section.
Table of Contents

Do you want to change the background color on scroll in WordPress? Changing the background color of a section on a scroll can enhance the visual appeal of your website and create a memorable impact on your visitors.

With the Container block from Nexter Blocks, you can effortlessly change the background color of a section on scroll in WordPress.

To check the complete feature overview documentation of the Nexter Blocks Container block, click here.

Requirement  – This block is a part of the Nexter Blocks, make sure it’s installed & activated to enjoy all its powers.

Add the Container block with the appropriate layout to the page and follow the steps –

1. Go to Style > Background Deep Layer.

2. Select On Scroll Animation from the Select Background Option dropdown.

3. In the item List section, you’ll find three items by default.

4. Open an item, and in the Background section, you have to add either a solid background color or a gradient.

5. You have to add one more item and set a background color to see the color change effect on the scroll.

You can click on the + Add Item button to add more background colors.

6. From the On Scroll Change dropdown, you can set the background color change effect. Here, you’ll find two options.

  • Gradient Like Effect – With this option, the colors added to the repeater items will change gradually with a transition, creating a gradient color effect as you scroll.
  • Direct Color Change Effect – With this option, the colors added to the repeater items will change instantly as you scroll.

Select the option as per your requirements. Let’s select Direct Color Change Effect here.

Note: For the Gradient Like Effect you can set the animation duration for changing background colors from Transition Duration (s) section.

Now, you’ll see the background color change as you scroll.

About the Author

Photo of Aditya Sharma CMO of NexterWP
CMO at POSIMYTH Innovations · NexterWP · 7 years experience

He has spent years in the WordPress ecosystem building, breaking, and optimizing sites until they actually perform. He works at the intersection of speed, growth, and usability, helping creators ship websites that load fast and convert. An active WordPress community contributor sharing through tools, tutorials, and direct collaboration. Tested practice, not theory.

WordpressThemesElementorn8nAIClaudeAutomationServer

Share your Thoughts

Get Instant Answers to all your questions about Nexter Blocks,
Extensions & Theme trained on 1000+ Docs and Videos

Still in Doubt? Let’s Assist You

Have Feedback or Questions?

Join our WordPress Community on Facebook!

Related Frequently Asked Questions

What if the background color doesn't change on scroll?

If the background color isn't changing as expected, ensure that the Container block from Nexter Blocks is properly installed and activated. Check that you've selected 'On Scroll Animation' from the Select Background Option dropdown. Also, verify that you've added multiple items in the Background section to see the color change effect.

What settings work best for changing background color on scroll?

For optimal results when changing background color on scroll, consider using the 'Direct Color Change Effect' for a more immediate visual impact. Additionally, adjust the Transition Duration (s) if you choose the gradient effect to control how quickly the colors transition, ensuring it aligns with your site's design.

Does the Container block support other page builders besides Gutenberg?

The Container block is designed primarily for Gutenberg, which means it works best within that ecosystem. While it also supports Elementor and Bricks, using it with Gutenberg will provide the most seamless experience and access to all features.

What happens if I only add one background color?

If you only add one background color, the scroll effect will not be noticeable since there are no additional colors to transition to. To see the background color change effect on scroll, you need to add at least two items with different background colors.

Last reviewed: April 14, 2026

Related Docs