How can I change a button's color on hover?

后端 未结 3 457
猫巷女王i
猫巷女王i 2020-11-27 06:47

I need to change the color of a button on hover.

Here is my solution, but it doesn\'t work.

a.button {
   display: -moz-inline-stack;
   display: inl         


        
3条回答
  •  猫巷女王i
    2020-11-27 07:25

    Seems your selector is wrong, try using:

    a.button:hover{
         background: #383;
    }
    

    Your code

    a.button a:hover
    

    Means it is going to search for an a element inside a with class button.

提交回复
热议问题