I am trying to apply a CSS3 gradient using JavaScript. I have an array of random colours and I select one of these colours and then apply it to a gradient. The problem is, that because the CSS3 background property doesn't have vendor prefixes, I can't seem to set them all. An example in CSS is this:
background: #3C60EF; /* Old browsers */
background: -webkit-linear-gradient(left top, #3C60EF, #133de5); /* For Safari 5.1 to 6.0 */
background: -o-linear-gradient(bottom right, #3C60EF, #133de5); /* For Opera 11.1 to 12.0 */
background: -moz-linear-gradient(bottom right, #3C60EF, #133de5); /* For Firefox 3.6 to 15 */
background: linear-gradient(to bottom right, #3C60EF, #133de5); /* Standard syntax (must be last) */
So, as you can see, I can't apply all them to the element. I need to either figure out what browser I am using or find a way of adding all these.
Any help would be appreciated.