By default, the linear-gradient
function generates
a gradient that goes from top to bottom.
This can be changed by specifying the direction
of the gradient using keywords such as
to top
, to bottom
, to left
, and to right
.
Let's look at an example:
As shown in the example above, to right
means the gradient starts from the left side
and goes to the right.
Similarly, to left
means it starts from
the right and goes to the left.