Style button when :active different from :hover

前端 未结 3 370
深忆病人
深忆病人 2021-01-28 07:37

I want to make a button that displays a background color when hovering and a button color without a background color when the button is down. Here is my current code:

         


        
3条回答
  •  庸人自扰
    2021-01-28 08:08

    `button:hover{background-color: transparent;color: yellow;}

    button:active {background: white;color: black;}`

提交回复
热议问题