Marko Vasic
Marko Vasic

Reputation: 690

Css texture radial gradient

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

Upvotes: 0

Views: 297

Answers (1)

Rodik
Rodik

Reputation: 4092

You are overriding the background-image property by assigning new values to background immediately after.

to keep both backgrounds in each case, you should specify both backgrounds in every re-declaration of background, using comma separated notation

example:

background: -webkit-radial-gradient(rgba(253,253,253,0.1) 0%,rgba(237,237,242,0.7) 100%),
                                    url('../img/texture.png');

Upvotes: 1

Related Questions