Help needed with Pseudo classes.
Im trying to make something like, when a list item is hovered, the rest of the list items should become little bit transparent.
my css is something like this,
How should i do it?
2 Replies
you can use the has-selector (not fully supported yet https://caniuse.com/css-has)
so if daily-weekly-forecast has a list item that is hovered, set the opacity to all list items that are not hovered
other option is to set opacity of the list items when the .daily-weekly-forecast is hovered, with exemption of the li that is hovered
Downfall for this is that all list items will get an opacity when you hover the gap in between the cards
yeah i noticed. the above code is working on brave. i was wondering can this be done something like when list item is hovered, apply opacity to all the list items and then the current list item hovered add opacity:1