transitions for linear gradient
boi it isnt workingg
by Yash Agasti
HTML
<div class="spotlight-prev spotlight-arrows"><span>❮</span></div>
<div class="spotlight-next spotlight-arrows"><span>❯</span></div>
CSS
body{
background: gray;
}
.spotlight-prev {
position: absolute;
left: 0;
top: 0;
transition: background 1500ms ease-out;
background: linear-gradient(-90deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.1));
}
.spotlight-prev span {
position: relative;
left: 35%;
top: 47.5%;
}
.spotlight-arrows {
height: 100%;
width: 7%;
cursor: pointer;
}
.spotlight-arrows span {
color: #fff;
font-size: 250%;
}
.spotlight-next {
position: absolute;
right: 0;
top: 0;
transition: background 0.5s ease-out;
background: linear-gradient(90deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.1));
}
.spotlight-next span {
color: #fff;
position: absolute;
right: 35%;
top: 47.5%;
}
.spotlight-prev:hover {
background: linear-gradient(-90deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.9));
}
.spotlight-next:hover {
background: linear-gradient(90deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.9));
}