Reputation: 7758
Is there a way to create gradients using CSS3 and then - by using javascript (or server side?) - I will be able to support IE or other unsupported browsers? I mean - the js library will convert the gradient to PNG background..
Is there something like that?
Upvotes: 1
Views: 499
Reputation: 20066
Actually it is possible using the URL(data...) And passing base64 bitmap data defining your png on the fly as it were. See http://www.patternify.com/ for an example of this technique in action
Upvotes: 1
Reputation: 7758
I found also this cool tool:
http://www.colorzilla.com/gradient-editor/
It gives you the ability to customize a gradient (with a lot of features) and it supports all browsers! Cool!
Upvotes: 0
Reputation: 445
I couldn't find a way to convert CSS gradients to PNG, I assume you'll have to construct them beforehand and display the correct background depending on the user-agent (i.e. PNG background for older browsers).
However, if you're looking for a way to create gradients in CSS3 for all browsers, try this website:
http://robertnyman.com/2010/02/15/css-gradients-for-all-web-browsers-without-using-images/
It will give you the recipe for gradients on all browsers.
Upvotes: 3