How to Make a Linear Gradient in CSS

PHOTO EMBED

Wed Jan 08 2020 19:00:00 GMT+0000 (Coordinated Universal Time)

Saved by @solitaire_4_07 #css #design #gradient

.gradient {
  background-image:
    linear-gradient(
      to right, 
      red, 
      blue,
      yellow, 
      green
    );
}
content_copyCOPY

line 4: specifies the direction. Can also be defined in degrees. e.g. "45 deg" line 5-8: can specify as many colours as you want in the gradient. At least two different colours needed to form a gradient.