Change button:active in css

后端 未结 4 2049
面向向阳花
面向向阳花 2021-01-28 07:40

how i can change button to have border-radius: 6px; and to by active marked when i will select it. Here is my HTML code and i also have CSS. When i make

4条回答
  •  北恋
    北恋 (楼主)
    2021-01-28 08:26

    Add this to your css

    .button:active{
        border-radius: 6px;
    }
    

    In your html just add the below code. NOTE- :active :hover should be in your css, not in your class attribute. Hence remove :active from your class attribute as below

提交回复
热议问题