I want the background to be colored with linear gradient when hover in css. Since the transition is very fast, I tried to handle it with transition, but unfortunately it does not work when there is a transition linear gradient. Could someone help me on this?
<div class="scroolspy d-none d-lg-block">
<ul>
<li>
<a href="#">asd</a>
</li>
</ul>
</div>
<style>
.scroolspy {
position: fixed;
height: 100%;
width: 10%;
top: 0%;
left: 0%;
}
.scroolspy:hover {
background: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
transition: 2s linear;
-webkit-transition: 2s linear;
-moz-transition: 2s linear;
-ms-transition: 2s linear;
-o-transition: color 2s ease-out;
}
</style>