2
How can I apply a transition, for example in a background:linear-gradient(to top, rgba(0,0,0,.6) 0%, rgba(0,0,0,0) 40%)
without hover
and background:linear-gradient(to top, rgba(0,0,0,.8) 0%, rgba(0,0,0,0) 60%)
with hover
no after an element ?
For example, I tried the following code:
a:after{
content:'';
top:0;
bottom:0;
left:0;
right:0;
position:absolute;
background:linear-gradient(to top, rgba(0,0,0,.6) 0%, rgba(0,0,0,0) 40%);
transition:background 1s ease-out
}
a:hover:after{
background:linear-gradient(to top,rgba(0,0,0,.8) 0%,rgba(0,0,0,0) 50%)
}
but apparently it didn’t work, there’s some way to accomplish that ?
This code of yours is working. https://jsfiddle.net/vqub032t/
– Marcus Maciel
but and the transition ?
– Murilo Melo