change background color of li using jquery

前端 未结 4 1336
情书的邮戳
情书的邮戳 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:30

    If you're wanting a nice hover effect then you'll want jquery, you'll also need jquery-color.js, the code is below:

    
    

    HTML Markup:

    
    

    CSS:

    #menu ul li .dummyclass {
        /*Dummy class to aid hovering with jQuery*/
    }
    

提交回复
热议问题