Jump to content

Search In
  • More options...
Find results that contain...
Find results in...

background color change

Recommended Posts

Hello, everyone. Please tell me what I am doing wrong. I want to achieve an effect like in this example:

See the Pen xxVLwzJ by mikeK (@mikeK) on CodePen

Only with locomotive scroll. Here is my demonstration. Where did I make a mistake? My sections do not change color.

See the Pen bGeWNOE by GeorgeDesign2020 (@GeorgeDesign2020) on CodePen

Link to comment
Share on other sites

Look in the console - it shows you the issue: color is not defined. Maybe you meant sectionContent?

  • Like 1
Link to comment
Share on other sites

you're probably right... I changed it to color, changed not much the name of the variable and everything works. The only thing I do not understand is why gray appears. It is only visible for the first time when you open a project. Look, please, what can you say?  between section one and section two

Link to comment
Share on other sites

Your background doesn't have an initial color so it uses a default of #000 as the start point. Fix it by setting the initial color.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.