我有一个风格的属性,显示在所有浏览器中除IE以外的深黄色
backgroud: -moz-linear-gradient(center top , #FDE37A, #FFCC01) repeat scroll 0 0 transparent但在IE中,该颜色显示为粉红色
在IE中,他们有没有替代moz-线性梯度的方法?
谢谢
发布于 2012-07-11 14:50:31
在IE上试试这个,
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FDE37A', endColorstr='#FFCC01',GradientType=0 );您可以使用以下链接生成跨浏览器渐变,
http://www.colorzilla.com/gradient-editor/
发布于 2012-07-11 14:48:01
对于IE,您应该使用-ms-前缀;在这种情况下,您的代码将如下所示:-ms-linear-gradient(center top , #FDE37A, #FFCC01) repeat scroll 0 0 transparent。只需考虑到IE8和较早版本几乎不支持CSS3,而且IE9的支持也是有限的;但是,渐变应该可以工作。你是在哪个版本的IE上测试的?
发布于 2012-07-11 14:52:18
对于IE浏览器中的渐变和多种背景,请使用CSS3 PIE Background http://css3pie.com/documentation/supported-css3-features/
适用于IE9 - http://www.colorzilla.com/gradient-editor/
编辑:渐变是CSS3功能,旧的IE浏览器不支持它。如果您正在使用
backgroud: -moz-linear-gradient(center top , #FDE37A, #FFCC01) repeat scroll 0 0 transparent将其添加为-
background: yellow; //IE8 and 7 will to refer this property
backgroud: -moz-linear-gradient(center top , #FDE37A, #FFCC01) repeat scroll 0 0 transparent;https://stackoverflow.com/questions/11426806
复制相似问题