The CSS linear-gradient() function creates an image which represents a linear gradient of colors. The image is not a CSS <color> but an image with no intrinsic dimensions. The gradient's concrete size will match the size of the element it applies to.
Syntax | |
---|---|
CSS | linear-gradient( [ [ <angle> | to <side-or-corner> ] || <color-interpolation-method> ]? , <color-stop-list> ), where <side-or-corner> = "[ left | right ] || [ top | bottom ]", <color-stop-list> = "<linear-color-stop> , [ <linear-color-hint>? , <linear-color-stop> ]#", <linear-color-stop> = "<color> && <color-stop-length>?", <linear-color-hint> = "<length-percentage>", and <color-stop-length> = "<length-percentage>{1,2}" |