Change background of child if parent :hover

前端 未结 1 1870
无人共我
无人共我 2021-01-12 08:39

I want to change the bg-color of .circle.icon if posts-item is hovered. Any idea how to accomplish that, possibly without Javascript?



        
相关标签:
1条回答
  • 2021-01-12 09:09

    Like so.

    .posts-item:hover .circle.icon {
        background: green;
    }
    

    No jQuery - Everyone's happy :)

    0 讨论(0)
提交回复
热议问题