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 如何在多个背景中使用供应商属性?_Css_Linear Gradients_Multiple Browsers - Fatal编程技术网

Css 如何在多个背景中使用供应商属性?

Css 如何在多个背景中使用供应商属性?,css,linear-gradients,multiple-browsers,Css,Linear Gradients,Multiple Browsers,我想在css中使用多个背景,Firefox 3.61、Chrome/Safari目前支持这些背景,据说是Opera10.5(不在gnu/linux上运行)。这是工作良好,但我想使用线性梯度作为背景。它在Firefox上运行正常,在Chrome上根本不起作用,但我不知道如何使它同时适用于两者。 有什么线索吗? 最接近我需要的,但我还不能让它与chrome一起工作。我不确定,但我猜chrome还不支持它。虽然一个元素上有多个背景图像和css渐变听起来不错,但我仍然建议使用多个元素,每个元素有一个背景

我想在css中使用多个背景,Firefox 3.61、Chrome/Safari目前支持这些背景,据说是Opera10.5(不在gnu/linux上运行)。这是工作良好,但我想使用线性梯度作为背景。它在Firefox上运行正常,在Chrome上根本不起作用,但我不知道如何使它同时适用于两者。 有什么线索吗?
最接近我需要的,但我还不能让它与chrome一起工作。

我不确定,但我猜chrome还不支持它。虽然一个元素上有多个背景图像和css渐变听起来不错,但我仍然建议使用多个元素,每个元素有一个背景图像。出于某种原因,仍然有人使用IE,而IE对CSS3一点也不友好。

这对我来说很有效。似乎将mozilla放在webkit之后会使webkit确认背景图像存在第二个参数,并取消其旧声明。所以我把-moz声明放在-webkit之前

background-image: url("../images/block_stripe_bg.png"); /* for older browsers */ background-image: url("../images/block_stripe_bg.png"), -moz-linear-gradient(center top, white, #dddddd); /* works for mozilla, ignored by other browsers */ background-image: url("../images/block_stripe_bg.png"), -webkit-gradient(linear, center top, center bottom, from(white), to(#dddddd)); /* works for webkit, ignored by other browsers */ background-repeat: repeat; /* older browsers */ background-repeat: repeat, no-repeat; /* newer browsers should apply this to both backgrounds*/ 背景图像:url(“../images/block_stripe_bg.png”);/*对于较旧的浏览器*/ 背景图像:url(“../images/block_stripe_bg.png”),-moz线性渐变(中间顶部,白色,#dddddd);/*适用于mozilla,被其他浏览器忽略*/ 背景图像:url(“../images/block_stripe_bg.png”),-webkit渐变(线性、中间顶部、中间底部、从(白色)到(#dddddd));/*适用于webkit,被其他浏览器忽略*/ 背景重复:重复;/*旧浏览器*/ 背景重复:重复,不重复;/*较新的浏览器应将此应用于两种背景*/