如何删除 Firefox 在按钮和链接上的虚线轮廓? [英] How to remove Firefox's dotted outline on BUTTONS as well as links?

查看:21
本文介绍了如何删除 Firefox 在按钮和链接上的虚线轮廓?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以让 Firefox 在 链接 上不显示丑陋的虚线焦点轮廓:

I can make Firefox not display the ugly dotted focus outlines on links with this:

a:focus { 
    outline: none; 
}

但是对于 <button> 标签,我该如何做到这一点呢?当我这样做时:

But how can I do this for <button> tags as well? When I do this:

button:focus { 
    outline: none; 
}

当我点击按钮时,它们仍然具有虚线焦点轮廓.

the buttons still have the dotted focus outline when I click on them.

(是的,我知道这是一个可用性问题,但我想提供适合设计的我自己的焦点提示,而不是丑陋的灰点)

(and yes, I know this is a usability issue, but I would like to provide my own focus hints which are appropriate to the design instead of ugly grey dots)

推荐答案

button::-moz-focus-inner {
  border: 0;
}

这篇关于如何删除 Firefox 在按钮和链接上的虚线轮廓?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆