Highlight hovered over div
.my_style:hover {
border-color: rgba(139,124,248,0.4);
background: rgba(139,124,248,0.05);
}
Apply hover over the top, e.g. for an image based button
The ::after element sits on top of the image
.my_style {
width: 50px;
height: 30px;
cursor: pointer;
position: relative;
}
.my_style::after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(242,100,25,0.5);
opacity: 0;
transition: opacity 0.3s ease;
}
.my_style:hover::after {
opacity: 1;
}
