0

I am not able to apply the transition property on hover for changing the gradient. I have attached the code for reference. I am not sure, where I am going wrong.

#grad1 {
  height: 150px;
  width: 500px;
  background-color: red;
  transition: background-color 2s;
}

#grad1:hover {
  background-image: linear-gradient(to right, red, yellow);
}
<div id="grad1"></div>
Gerard
  • 15,418
  • 5
  • 30
  • 52
zilcuanu
  • 3,451
  • 8
  • 52
  • 105

0 Answers0