I have a div that has
.mydiv{
background-color:white;
color:red;
}
.mydiv:hover{
background-color:red;
cursor: pointer;
color:white;
}
and I would like to have nice hover-like properties also on touch devices. The behavior I get is not exactly what I want. The hover-like behavior does occur, but it is sticky. I discovered that if I instead add
.mydiv:active{
background-color:red;
cursor: pointer;
color:white;
}
then the stickiness goes away, and it works as I want. However, then the normal hover behavior (on non-touch devices) goes away. :(
What is the right way to do this?