The CSS linear-gradient function creates an effect which represents a linear gradient of colors on the element. The Top to Bottom gradient effects the element from top to bottom and the left to right gradient effects the element from left to right.