How can I make the transition
work with the example 1 that has the color made with linear-gradient
, like the example 2 that has a solid color? p>
If possible, only in CSS
.e1 {
width: 70px;
height: 70px;
background: linear-gradient(#400080, transparent), linear-gradient(200deg, #d047d1, #f00, #ff0);
transition: background .5s ease-in-out;
}
.e1:hover {
background: linear-gradient(#2d0059, transparent), linear-gradient(200deg, #a739a8, #b00000, #b5b500);
}
.e2 {
width: 70px;
height: 70px;
background: red;
transition: background .5s ease-in-out;
}
.e2:hover {
background: yellow;
}
Ejemplo 1
<div class="e1"></div>
<br>
Ejemplo 2
<div class="e2"></div>