How To Use CSS To Create A Gradient Background

Is there any way to use pure css to create a gradient background for a block?

From CSS3, you can use CSS3 gradients to display smooth transitions between two or more specified colors and you dont need to use images for these effects.

the following is browser supporting table

From 10.0From 26.0From 16.0From 6.112.1

*For early version, you still can use vendor prefix to create the gradient background.

A linear gradient from top to bottom by css3


A linear gradient from left to right:


A linear gradient that starts at top left (and goes to bottom right):

0 0 vote
Article Rating
Notify of
Inline Feedbacks
View all comments