Re: [CSS3] linear-gradient() proposal

On 27/03/2011 4:15 PM, Andrew Fedoniouk wrote:

> Position of this rectangle inside background box of the element is defined
> by the <background-position>, see:
> http://www.w3.org/TR/CSS2/colors.html#propdef-background-position
>
> So syntax of linear-gradient() declaration will look like this:
>
> <linear-gradient> = linear-gradient(
> [ <background-position> || <angle> ,]? <color-stop>[, olor-stop>]+ );
>
> Here is an illustration of such "gradients with alignment":
> http://terrainformatica.com/w3/linear-align-1.png


You can use background-size with gradients.

<!DOCTYPE html>
<style type="text/css">
div {
height: 200px; width: 200px;
-moz-border-radius: 100px 100px;
border-radius: 100px 100px;
background: #385179;
background: #385BE1 -moz-radial-gradient(rgba(255,255,255,1), 
rgba(56,91,225,0)) -50px -50px no-repeat;
background: #385BE1 -webkit-gradient(radial, 125 125, 0, 125 125, 150, 
from(rgba(255,255,255,1)), to(rgba(56,91,225,0))) -50px -50px no-repeat;
-moz-background-size: 250px 250px;
background-size: 250px 250px;
}
</style>
<div></div>


Also the I believe the current CSS gradient behavior is the same as SVG 
gradients.



-- 
Alan http://css-class.com/

Armies Cannot Stop An Idea Whose Time Has Come. - Victor Hugo

Received on Sunday, 27 March 2011 13:47:32 UTC