CSS Firefox - 如何停用虚线边框(firefox 单击指示器)?
对于我最近的网络项目来说,这个点击指示器是一个令人厌恶的部分。我讨厌这个! - 我如何对我的 Firefox 浏览器说他不应该标记单击的对象?
This click indicator is a disgusting piece for my recent web projects.. I hate this! - How can I say to my Firefox browser that he should not mark the clicked object?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
如果您的菜单项不是输入元素(例如按钮),您可以使用 CSS 隐藏它,如下所示:
Provided that your menu items are not input elements (say, buttons), you can hide it using CSS, like so:
一个{
概要:无;
}
a {
outline: none;
}
在这之前没有任何帮助(Firefox 20.1):
Nothing helped (Firefox 20.1) until this:
这是更准确的:
this is more accurate:
更具体地说,您可以删除悬停时的轮廓(假设鼠标输入),但将其保留为焦点(假设键盘输入)。这将保留大部分可访问性。话虽这么说:
To be more specific to @ioannis-karadimas, you could remove the outline on hover (assuming mouse input) but leave it for focus (assuming keyboard input). This would retain most of the accessibility. That being said:
基于这篇文章 ,添加
outline:0
也能达到目的。如果您不想让网站中的任何元素显示边框,请尝试以下操作,
Based on this post, adding
outline:0
will also do the trick.If you don't want to have the border shown to any element in your website, try the following,
您可能讨厌它,但您的客户可能不喜欢。一般来说,覆盖浏览器功能是迷惑用户并促使他们不访问您的网站的好方法。
You might hate it, but your customers might not. Generally speaking overriding browser functionality is a great way to confuse users and inspire them not to visit your site.
疯狂的解决方案:
但我不喜欢它。
事实上,当我单击输入类型=“按钮”时,Firefox 12.0 会在输入类型上标记一个点。
outline:none
对:active, :focus, ... 没有任何作用
Crazy solution:
but I dislike it.
Indeed Firefox 12.0 is marking a dotted on input type="button" when I click it.
outline:none
does nothing for:active, :focus, ...