How to exclude particular class name in CSS selector?

后端 未结 3 1292
挽巷
挽巷 2020-11-29 21:02

I\'m trying to apply background-color when a user mouse hover the element whose class name is \"reMode_hover\".

But I do not want to change color if th

3条回答
  •  北海茫月
    2020-11-29 21:50

    One way is to use the multiple class selector (no space as that is the descendant selector):

    .reMode_hover:not(.reMode_selected):hover 
    {
       background-color: #f0ac00;
    }
    
        Design
    
    
    
        Design
    

提交回复
热议问题