0

I have a problem with radial gradient and texture. I have something like this:

background-image: url('../img/texture.png'); 
/* fallback */ 
background:  -moz-radial-gradient(rgba(253,253,253,0.1) 0%, rgba(237,237,242,0.7) 100%); /* FF3.6+ */
background: -webkit-gradient(radial, color-stop(0%,rgba(253,253,253,0.1)), color-stop(100%,rgba(237,237,242,0.7))); /* Chrome,Safari4+ */
background: -webkit-radial-gradient(rgba(253,253,253,0.1) 0%,rgba(237,237,242,0.7) 100%); /* Chrome10+,Safari5.1+ */
background: -o-radial-gradient(rgba(253,253,253,0.1) 0%,rgba(237,237,242,0.7) 100%); /* Opera 11.10+ */
background: -ms-radial-gradient(rgba(253,253,253,0.1) 0%,rgba(237,237,242,0.7) 100%); /* IE10+ */
background: radial-gradient(rgba(253,253,253,0.1) 0%,rgba(237,237,242,0.7) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1adb7c64', endColorstr='#b3dd532f',GradientType=0 ); /* IE6-9 */

but I get radial gradient without that background texture(../img/texture.png). Anyone know how to do this? Thanks in advance for your answers

4

1 回答 1

1

您正在background-image通过立即分配新值来覆盖该属性background

要在每种情况下保留两个背景,您应该在每次重新声明 时指定两个背景background,使用逗号分隔符号

例子:

background: -webkit-radial-gradient(rgba(253,253,253,0.1) 0%,rgba(237,237,242,0.7) 100%),
                                    url('../img/texture.png');
于 2013-09-03T08:32:02.127 回答