How do you set a gradient that transitions from left to right?

  • background: gradient(left right, color1, color2)
  • background: linear-gradient(left, color1, color2)
  • gradient: left-to-right(color1, color2)
  • linear-gradient(right, color1, color2)
To set a gradient that transitions from left to right, use the background: linear-gradient(left, color1, color2) property. This ensures the gradient starts from the left side and progresses to the right side of the element.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *