Quantcast
Channel: Marius' Blog » CSS
Viewing all articles
Browse latest Browse all 5

How to use gradient and a background image on the same element with CSS3

$
0
0

Use this CSS code to use gradient and a background image on the same element.

CSS code:

#id, .class{
    background: url([IMAGE URL]), -webkit-gradient(linear, left bottom, left top, color-stop(0, [COLOR]), color-stop(1, [COLOR]));
    background: url([IMAGE URL]) 0px -80px, -moz-linear-gradient(center bottom, [COLOR] 0%, [COLOR] 100%);
}

Viewing all articles
Browse latest Browse all 5

Trending Articles