【发布时间】:2012-10-20 19:21:25
【问题描述】:
我发现很多关于 IE9 不呈现背景图像的问题,但找不到适合我需要的解决方案。
我使用 CSS3 渐变生成器作为背景,它适用于除 IE9 之外的所有现代浏览器。
我使用的代码是:
body {
background-size: cover;
background-repeat: no-repeat;
background-image: linear-gradient(bottom, rgb(184,190,227) 49%, rgb(118,135,250) 80%);
background-image: -o-linear-gradient(bottom, rgb(184,190,227) 49%, rgb(118,135,250) 80%);
background-image: -moz-linear-gradient(bottom, rgb(184,190,227) 49%, rgb(118,135,250) 80%);
background-image: -webkit-linear-gradient(bottom, rgb(184,190,227) 49%, rgb(118,135,250) 80%);
background-image: -ms-linear-gradient(bottom, rgb(184,190,227) 49%, rgb(118,135,250) 80%);
background-image: -webkit-gradient(linear,left bottom,left top,color-stop(0.49, rgb(184,190,227)),color-stop(0.8, rgb(118,135,250)));
}
我设置了一个jsFiddle页面:http://jsfiddle.net/nUA98/
所以,如果有人知道为什么它在 IE9 中不起作用,将不胜感激评论/回答。
谢谢。
【问题讨论】:
-
caniuse.com 是一个非常有用的资源:@987654322@
-
@Stefan 好像很完整的资源,放到我的收藏夹里,太好了!
标签: internet-explorer css internet-explorer-9 background-image