Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
CSS:如何设置渐变背景跨浏览器(仅缺少IE8和IE9)_Css_Internet Explorer 8_Internet Explorer 9_Background Color_Linear Gradients - Fatal编程技术网

CSS:如何设置渐变背景跨浏览器(仅缺少IE8和IE9)

CSS:如何设置渐变背景跨浏览器(仅缺少IE8和IE9),css,internet-explorer-8,internet-explorer-9,background-color,linear-gradients,Css,Internet Explorer 8,Internet Explorer 9,Background Color,Linear Gradients,我已经创建了自己的导航栏,并想为它设置一个简单的渐变背景色 到目前为止,我有以下内容,这些内容在较新的浏览器中运行良好,但我不确定我必须在这里添加哪些内容来涵盖IE8和IE9(我对较旧的版本不感兴趣) 另外,我遇到了过滤器:progid。。。当搜索此时。 有人能告诉我是否需要在此处添加此内容以涵盖常见浏览器或我是否需要为此添加或更改任何其他内容吗? 我想支持更新版本的Chrome、Firefox、Opera和Safari+IE(包括IE8和IE9) 我的CSS: background: -moz

我已经创建了自己的导航栏,并想为它设置一个简单的渐变背景色

到目前为止,我有以下内容,这些内容在较新的浏览器中运行良好,但我不确定我必须在这里添加哪些内容来涵盖IE8和IE9(我对较旧的版本不感兴趣)

另外,我遇到了
过滤器:progid
。。。当搜索此时。 有人能告诉我是否需要在此处添加此内容以涵盖常见浏览器或我是否需要为此添加或更改任何其他内容吗?
我想支持更新版本的Chrome、Firefox、Opera和Safari+IE(包括IE8和IE9)

我的CSS:

background: -moz-linear-gradient(top, #02b0fd 0%, #028dca 100%); /* Firefox */
background: -ms-linear-gradient(top, #02b0fd 0%, #028dca 100%); /* IE10 */  
background: -o-linear-gradient(top, #02b0fd 0%, #028dca 100%); /* Opera */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #02b0fd), color-stop(1, #028dca)); /* Webkit (Safari) */
background: -webkit-linear-gradient(top, #02b0fd 0%, #028dca 100%); /* Webkit (Chrome) */
background: linear-gradient(top, #02b0fd 0%, #028dca 100%);
多谢各位,
Mike

过滤器:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0002b0fd',endColorstr='#028dca',GradientType=0)

会给你IE6-9


使用:

非常感谢!其余的可以吗?十六进制代码真的是8位吗?快速浏览一下,它看起来应该可以工作(我很确定你需要背景:在其他人面前)。是的,十六进制代码考虑了不透明度。如果您最终遇到其他问题,我建议您使用colorzilla资源。这真是太有用了!再次感谢-帮了大忙!我一定会尝试ColorZilla。最后一点注意:在实现这个功能之后,它看起来需要在所有旧浏览器支持之前添加“背景:”所以我在我的帖子中添加了这个。