I can see the effect of :active
even though I have :focus?
I'm trying here but when I click on the element the effect of :active
is not shown jumping straight to :focus
.
.btn{
color: black;
background-color: #FFFFFF;
padding: 6px 12px;
cursor: pointer;
border-radius: 4px;
border-color: #CCC;
outline: none;
}
.btn:active{
color: #333;
background-color: red;
}
.btn:focus{
color: #333;
background-color: #e6e6e6;
}
<button class="btn">button</button>