Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a background animation that zooms in on the background (the "breathe" effect) but the problem is that when I refresh the page, the starting position for the page is off-set to the left by roughly how much the background has moved (in relation to the initial/correct position).

What I have tried:

I've tried and still have "overflow-x: hidden" in the CSS; it works but not completely. Building a wrapper/page around this page doesn't fix it either. I have a jsfiddle made, that can show the action of the background/the effect but not the problem; I don't know how to refresh the jsfiddle rather than re-run it fully. JSFiddle: https://jsfiddle.net/Isntlee/81y03nbz/19/

stackoverflow: https://stackoverflow.com/questions/59900722/background-animation-forces-landing-page-off-centre-on-refreshing-how-do-i-fix
Posted
Updated 30-Jan-20 4:41am

1 solution

Why not try z-index ?

Since you didn't supply the styles it's the best guess for the easiest implementation I can make.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900