Doesn't look like its possible to do a non-linear (e.g. Bezier-curve fill) css3 gradient; anyone know if it's possible in html5 canvas?
I think the initial comment is really about the rate of progression from one color to another within the gradient, not the physical shape of the gradient.
To address the former: no, unfortunately at this time there is no way to do non-linear CSS gradient fills. However, you can use successive color stops to achieve some level of control over the shape of your gradient.
You could mess with the little squares under the gradient in the Colorzilla gradient generator or read the MDN linear-gradient article for detailed info on creating your own color stops.
The color stops can be used pretty creatively, especially combined with background-size
. Here is a great collection of CSS patterns built using gradients.
CSS preprocessors can also be used to generate gradients that feel non-linear (although they simply generate lots of stops without you having to think about each one). A recent CSS Tricks article about easing linear gradients demonstrates one such approach.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With