I'm playing with parallax at the moment and have an issue:
Here's the markup
<div class="welcome"></div>
<div class="welcome2" data-0="top: 100%;" data-1000="top: 0%;"></div>
<div class="weclome_text">
<h3 data-0="color: rgb(82,98,130);" data-1000="color: rgb(255,255,255);">Hello World</h3>
<div class="scroll-button" data-0="opacity: 1;" data-300="opacity: 0;"></div>
</div>
And CSS:
html,body { margin: 0; padding: 0; font-family: Sans-serif; }
body {
overflow-y: scroll;
overflow-x: hidden;
-webkit-overflow-scrolling: touch;
}
.welcome { position: fixed; top: 0; width: 100%; height: 100%; background: url(http://justdade.com/t/bg1.png) no-repeat; background-size: cover; }
.welcome2 { position: fixed; top: 100%; width: 100%; height: 100%; background: url(http://justdade.com/t/bg2.png) no-repeat; background-size: cover; }
.weclome_text {
position: fixed; position: fixed; top: 50%; left: 50%; margin-left: -60px; margin-top: -60px; width: 120px; height: 120px; color: #526282;
text-align: center;
}
.scroll-button { background: url(http://justdade.com/t/scroll-button.png); width: 60px; height: 60px; cursor: pointer; margin: 0 auto; }
Everything seems okay in all browsers expect Safari (Desktop, iOS also okay)
Safari scroll animation is lagging pretty hard after I press "scroll" arrow. I also noticed that scroll lags starts only if I use position: fixed;
Maybe someone can give me any clue where I should dig?
Thank you.