How to switch css background images without jq

now the mouse must be placed on the small icon before the picture can be switched. The user experience is too poor. How to switch
clipboard.png

clipboard.png

clipboard.png

when the mouse is over li.
   .showImage{
        overflow:hidden;
        margin: 0 auto ;
        background-image: url(../img/nav_bg.png) ;
        background-repeat:no-repeat;
        width: 22px;
        height: 22px;
    }
    li:hover{
        overflow:hidden;
        margin: 0 auto ;
        background-image: url(../img/nav_bg.png) ;
        background-repeat:no-repeat;
        width: 22px;
        height: 22px;
    }
/*    .showImage:hover{
        background-image: url(../img/nav_bg.png);
    }*/
    .item0{
      background-position: -235px -17px ;
    }
    .item0:hover{

      background-position: -235px -55px ;
    }
    .item1{
      background-position: -19px -17px ;
    }
    .item1:hover{
      background-position: -19px -55px ;
    }
    .item2{
      background-position: -63px -17px ;
    }
    .item2:hover{
      background-position: -63px -55px ;
    }
    .item3{
      background-position: -108px -17px ;
    }
    .item3:hover{
      background-position: -108px -55px ;
    }
    .item4{
      background-position: -152px -17px ;
    }
    .item4:hover{
      background-position: -152px -55px ;
    }
    .item5{
      background-position: -197px -17px ;
    }
    .item5:hover{
      background-position: -197px -55px ;
    }
Css
Mar.12,2021

li:hover .showImage{
            ...
        }

 li:hover .item2{
  background-position: -63px -55px ;
}

have you tried binding li events


it's very simple. Adjust li to be less than padding, and adjust the height and width of a to 100%, which will take up the entire li to achieve your effect. Similar:

-sharpcssmenu li { padding: 0px; }
-sharpcssmenu li a { margin: 0px; display: block; width: 100%; height: 100%; }

from your description, you can see that your switching logic should be registered on the element I under li, and you can register the switching logic on li, and then hover the mouse over li to display the elements under the control li, while the corresponding elements of other li are hidden.

my answer was

oooO baby Oooo
(step on) you die
(dead baby) /
_) thank you (_ /

)

I feel very upset. Maybe I shouldn't answer this question, because as described here:
https://codeshelper.com/a/11.
I failed to get whether the questioner realized the switching logic through css or event, but my answer description was more like a pseudo code, because I didn't see the key code of the subject. So write the above answer, if the subject thinks carefully and has a certain understanding, then he will certainly be able to understand that registering an action on the element li can be done either through events or through the pseudo-class of css, so the person who steps on me does not know what I said is wrong or how, and does not attach the reason for being trampled on, so people do not know how to improve.

Menu