CSS:如何设置渐变背景交叉浏览器(只缺少IE8和IE9) [英] CSS: How to set up gradient background cross browser (only missing IE8 and IE9)

查看:196
本文介绍了CSS:如何设置渐变背景交叉浏览器(只缺少IE8和IE9)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I have created my own navbar and would like to set up a simple gradient background color for it.

到目前为止,我有以下在新的浏览器中对我很好,但我不知道我要添加到这里覆盖IE8和IE9 <强>(我对旧版本不感兴趣)。

So far I have the following which works fine for me in newer browsers but I am not sure what I have to add here to cover IE8 and IE9 as well (I am not interested in older versions).

此外,我在搜索时遇到了 filter:progid ...。
有人可以告诉我是否需要在此处添加以覆盖常见浏览器,或者如果我需要添加或更改其他任何内容? >
我想支持更新版本的Chrome,Firefox,Opera和Safari + IE(包括IE8和IE9)。

Also, I came across filter: progid... when searching for this. Can someone tell me if this needs to be added here as well to cover common browsers or if I need to add or change anything else for that ?
I would like to support newer versions of Chrome, Firefox, Opera and Safari + IE (incl. IE8 and IE9).

我的CSS

My 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

Many thanks in advance, Mike

推荐答案

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

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

会为您提供IE6-9。

will give you IE6-9.

使用: http://www.colorzilla.com/gradient-editor/

这篇关于CSS:如何设置渐变背景交叉浏览器(只缺少IE8和IE9)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆