There may be a difference between newer versions and webkit versions:
How to combine background image gradient and CSS3 with the same element?
I have a small example of working with the following:
$(function(){ $("#myElement").css("background-image", "-webkit-linear-gradient(top, #000000, #ffffff)"); $("#myElement").css("background-image", "-moz-linear-gradient(top, black, white)"); });
here is the fiddle:
http://jsfiddle.net/Hmmpd/1/
Edit:
Odd using css "map" version of css works in Firefox, but not in my version of Chrome. That is, firefox works for me, but not chrome:
$(function(){ $("#myElement").css({backgroundImage: "-webkit-linear-gradient(top, #000000,#ffffff)",backgroundImage: "-moz-linear-gradient(top, black, white)"}); });
mutex
source share