How do I simulate a hover with a touch in touch enabled browsers?

后端 未结 14 2089
旧巷少年郎
旧巷少年郎 2020-11-22 17:04

With some HTML like this:

Some Text

Then some CSS like this:

p {
  color:black;
}

p:hover {
  color:red         


        
14条回答
  •  醉酒成梦
    2020-11-22 17:32

    Easyest solution I found: I had some < span > tags with :hover css rules in them. I switched for < a href="javascript:void(0)" > and voilà. The hover styles in iOS started working.

提交回复
热议问题