开发者

Want to disable outline when clicking on element with link (can't get it working with Firefox)

So I want to disable the outline when clicking on a link, but I still want users to be able to tab through all links with a keyboard. Therefore, this fix should work

a:active {
    outline: none; }

It works for all browsers except for Firefox. Any 开发者_开发百科suggestions?


If you are content with requiring your keyboard users to have JavaScript activated (I know, not perfect) you could give each link an outlined class onfocus, and remove it onblur.

For a more thorough approach, check out this blog entry that discusses removing the outline from a accessibility perspective.


a {outline:none;}

hope this helps

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜