change background color of li using jquery

前端 未结 4 1334
情书的邮戳
情书的邮戳 2021-01-22 23:56

I want to change the color of li which contains anchor when the mouse go over it, I make like this

 
4条回答
  •  囚心锁ツ
    2021-01-23 00:47

    You don't need any JavaScript at all. You can use CSS:

    li.sonItem:hover 
    {
        background-color: black;
    }
    

提交回复
热议问题