CSS linear gradient() Function
CSS linear-gradient() Function
The linear-gradient() function is used to set a linear gradient as the background image. We have at least two color stops for the creation of a linear gradient. Color stops are the colors that we want to render with smooth transitions. We can specify its direction along with its effects.
Syntax:-
Its syntax is:- background-image: linear-gradient(direction, color-stop1, ...);
Further Explanation:-
Value | Description |
---|---|
direction | Defines a starting point and a direction angle with gradient effects. |
color-stop1,... | Color stops are the colors that we want to render with smooth transitions. It consists of a color value, with an optional stop position. |