mobile safari links retains focus after touch

前端 未结 8 551
天涯浪人
天涯浪人 2020-12-13 13:33

My navigation is quite simple. I have a hover state which adds a border and a transparent gradient png background to some text, and an additional class which, when added by

8条回答
  •  北荒
    北荒 (楼主)
    2020-12-13 14:01

    If you're using Modernizr, the no-touch class will be added to the root html element for non-touch devices. Then you can do this:

    a.myclass {
       color:#999;
    }
    
    .no-touch a.myclass:hover,
    a.myclass:active {
       color:#ccc;
    }
    

提交回复
热议问题