gradient color top to bottom code example

Example 1: linear-gradient(top to bottom)

/* A gradient going from the top to bottom
   starting red and finishing orange */

.class {
    background: linear-gradient(to bottom, #f32b60, #ff8f1f);
}

Example 2: gradient css background

/*From bottom to top*/
background: rgb(166,166,166);
background: linear-gradient(0deg, rgba(166,166,166,1) 0%, rgba(255,255,255,1) 29%);

Example 3: html css background linear-gradient

#background {
  background-image: linear-gradient(to left, #4B2C4C , #151F28);
}

Tags:

Css Example