简体   繁体   English

背景CSS没有出现在IE9中

[英]Background CSS not showing up in IE9

I tried these codes and for some reason the background is not showing up in IE9. 我尝试了这些代码,由于某种原因,IE9中没有显示背景。 Compatibility mode is off, it's running in IE9 mode. 兼容模式已关闭,它在IE9模式下运行。 It works fine in IE 10, Chrome, and Firefox. 它在IE 10,Chrome和Firefox中运行良好。

body {
  background : url('/img/fade.png') repeat-x,
  url('/img/fadeh.png') repeat-y,
  url('/img/bg.png') repeat,
  ;
}

Second try: 第二次尝试:

body {
  /*background-image: url(img/fade.png), url(img/fadeh.png), url(img/bg.png);
  background-repeat: repeat-x, repeat-y, repeat;*/
}

Any help appreciated! 任何帮助赞赏!

Thanks 谢谢

try 尝试

<!DOCTYPE html>

ie9 breaks without a doctype with multiple background images ie9在没有具有多个背景图像的doctype的情况下中断

edit: 编辑:

also try in your css 也试试你的CSS

body {
    height:100%;
}

It is because you have add , on the last background url. 这是因为你有加,在过去的背景网址。

Replace with this 替换为此

body{
   background:url('/img/fade.png') repeat-x,
   url('/img/fadeh.png') repeat-y,
   url('/img/bg.png') repeat;
}

Example jsFiddle DEMO: http://jsfiddle.net/enve/5p4GS/ 示例jsFiddle DEMO: http //jsfiddle.net/enve/5p4GS/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM