Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/37.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
如何为不同的浏览器创建css3后台版本?_Css_Background_Gradient_Linear Gradients - Fatal编程技术网

如何为不同的浏览器创建css3后台版本?

如何为不同的浏览器创建css3后台版本?,css,background,gradient,linear-gradients,Css,Background,Gradient,Linear Gradients,我是CSS新手,不知道如何为所有浏览器创建不同版本的CSS代码段: background: -moz-linear-gradient(center top , rgba(255, 255, 255, 0.1) 0px, rgba(0, 0, 0, 0.1) 100%) repeat scroll 0 0 #66BAC0; 我从网上的某个地方得到了它,但它没有其他厂商的前缀或浏览器类型。如何使用在线工具或手动执行此操作?以下是您的代码: background: -moz-linear-gradi

我是CSS新手,不知道如何为所有浏览器创建不同版本的CSS代码段:

background: -moz-linear-gradient(center top , rgba(255, 255, 255, 0.1) 0px, rgba(0, 0, 0, 0.1) 100%) repeat scroll 0 0 #66BAC0;
我从网上的某个地方得到了它,但它没有其他厂商的前缀或浏览器类型。如何使用在线工具或手动执行此操作?

以下是您的代码:

background: -moz-linear-gradient(top, rgba(255,255,255,0.1) 0px, rgba(0,0,0,0.1) 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0px,rgba(255,255,255,0.1)), color-stop(100%,rgba(0,0,0,0.1)));
background: -webkit-linear-gradient(top, rgba(255,255,255,0.1) 0px,rgba(0,0,0,0.1) 100%);
background: -o-linear-gradient(top, rgba(255,255,255,0.1) 0px,rgba(0,0,0,0.1) 100%);
background: -ms-linear-gradient(top, rgba(255,255,255,0.1) 0px,rgba(0,0,0,0.1) 100%);
background: linear-gradient(to bottom, rgba(255,255,255,0.1) 0px,rgba(0,0,0,0.1) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1affffff', endColorstr='#1a000000',GradientType=0 );

我真的推荐这个网站:-它可以让你轻松地创建跨浏览器CSS渐变。

网上有大量的相关资源。见鬼,这里有大量的资源。你真的没有在搜索时找到它们吗?我找不到一个可以生成与上面类似代码的问题。几乎所有与“相关”列中右侧链接的问题都会有相关代码。我很难相信搜索css gradient会得到与#1结果不同的结果。95%的前缀属性可以复制/粘贴,只需修改前缀部分(例如,
-moz linear gradient
变成
-webkit linear gradient
)。我尝试过,但没有得到相同的颜色。它似乎变成了灰色。下面是colorzilla网站上的链接:-你在使用什么浏览器?我正在测试firefox、chrome和safari。我在问题中发布的代码适用于firefox,但不适用于chrome和safari。您的代码不能正常工作的原因是您使用了非firefox浏览器无法识别的供应商前缀
-moz
。只要把我所有的代码都复制到你的代码行中,它就可以在任何地方工作。我试了很多次。