Change color of body on click

Here interesting 404 page
When I click switch button in the upper right corner the color of page is changed.
How to impelement such effect in webflow?

Hey @zholdasbek,

I suggest using an overlay interaction.

  1. Create a DIV block that covers the full height and width of the screen, or how ever large you want it.
  2. Set it to “absolute” so that it covers the entire section.
  3. Increase the z-index to ensure it covers everything you want it to.
  4. Set it to be a color you desire.
  5. Create an Interaction for it to have 0 opacity.
  6. Create a button with an interaction set to it.
  7. Make that button interaction “affect different elements” and enter the anem of the overlay.
  8. Finally, set the interaction to bring the opacity to 100 hundred when clicked.

Hope that helps!

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.