I am currently developing a website where I have split the hero/header into two sections - one on the left with information and the other on the right with a graphic. I wanted to add a simple parallax effect to the image on the right side, so I used background-attachment: fixed;
.
However, I now need to change the background-attachment
property once the bottom of the graphic reaches the next section, so the image will scroll up along with the rest of the content from that point onwards.
You can view a Fiddle that demonstrates what I'm trying to achieve here:
https://jsfiddle.net/fg67ho2L/1/
Is there a way to make this work as intended so that the right side (image) behaves correctly? Your help is greatly appreciated. Thank you.