Fullscreen/scrolling background performance issues? (sorry for noobishness)
I'm sorry if this is a very common issue and/or I am missing something very obvious. My goal is to get my background to stretch across the whole screen while still scrolling with the rest of the page. The code I have now accomplishes that, but not without severe performance issues. The lag is atrocious. This is what I have so far:
<style>
html{
background: url(data/Background2.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
</style>
I've also tried:
<style>
html{
background: url(data/Background2.jpg) no-repeat fixed;
background-size: 100%;
}
</st开发者_如何学Goyle>
Finally, I've also tried this using a png copy of the same background, to no avail. Thank you so much for your time and consideration of my lowly noob problems.
Check your image size. If it's too large either in pixel dimension or file size that can have a great impact on performance.
精彩评论