Center website background on the screen?

I've seen this trick on many websites and I want to make it for a project of my own. I have an image `background.jpg` that is VERY BIG, just to be ready for any screen size. I wish to center the background image to the visitor's window. I mean, while scrolling the window content will move but the background will stay in place - centered vertically and horizontally. BTW most of the viewers will have old crappy PC's so it'd better not flicker, if it'll be JS.

以上就是Center website background on the screen?的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准