If you only have one image that you want to remain visible then you could just rub it out with the first section for a similar effect.
If you want the image to stop being fixed at a certain point then you would need js to do that. You would use the intersection observer and add a class to the body at an appropriate point and remove the fixed positioning.
Note that in my demo I used a fixed element with a normal background because ios does not work well with background-attachment fixed and background-size:cover. When you use cover it applies it to the whole document and not the viewport (it’s a long standing bug).
okay, but when I try to remove the fixed position, the image hops to its position and this does not look smooth.
Am I missing something?
Or maybe there is a way that as the user scrolls down, the parallax effect would move the image in smaller steps, so the “M” will not be hidden when you are viewing the next section.
Does it make sense?
Yes I think this may be closer to what you want unless I’m overthinking it
The only problem I see with this method is if your content section is greater than the viewport then the image swap won’t be seamless because the image size would change. If that’s the case then I guess you’d need another method to track the positions. It may be that you need to watch the element that follows after and then only apply the change once that one comes into view.
I think we may need to move this to the JS forum if you want to go with the JS solution
Just for fun I made another demo that caters for any height element and will scroll away the fixed image as soon as the bottom of the element leaves the bottom of the viewport.