Background Image distortion in IE10 and moving the background with content flow?

↘锁芯ラ 提交于 2020-01-03 04:39:12

问题


I have a webpage with a background image and a form which i have placed at the center of this webpage.

For background size to be working in ie 8 i have used background-size.htc polyfill

My requirement is background image should move with form content flow , that means when error messages appears below each input field the height of the form will increase that should also increase the height of the background image ,it should be relative to the bg image.Currently,its working in all browsers except ie what shoud i do for that?

Another thing in ie10 same bg image distorts? I'm attaching the screen shot of it.


回答1:


If you want to cover the background image to entire browser window at all times. please try this,

html { 
  background: url(images/bg.jpg) no-repeat center center fixed; 
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}


来源:https://stackoverflow.com/questions/22374444/background-image-distortion-in-ie10-and-moving-the-background-with-content-flow

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!