Stack Overflow
  1. 首页
  2. 工具
  3. 网站转让
  1. 首页
    1. 导航
    2. 问题
    3. 标签
    1. Teams
      Stack Overflow for Teams – Start collaborating and sharing organizational knowledge. Create a free Team Why Teams?
    2. Teams
    3. Create free Team
Collectives on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more

css - Mobile Firefox puts a blue box around

翻译自:https://stackoverflow.com/questions/11313709 2012-07-03T14:59:50.110
528 次
This question shows research effort; it is useful and clear
0
This question does not show any research effort; it is unclear or not useful
Bookmark this question.
Show activity on this post.

Whenever I click on an anchor in Mobile Firefox, it draws a blue border around the <a>, which persists after the anchor has been clicked. Here is a screenshot of how this looks:

enter image description here

In order to remove this border, I have tried adding the following to my CSS, to no effect:

a {-moz-user-select: none;}

a:link { outline:none; }
a:visited { outline:none; }
a:hover { outline:none; }
a:active { outline:none;  }
a:focus { outline:none; }

I have also tried adding the following snippet to my JavaScript on DOM ready, also to no effect:

$("a").live('click',function(event) {
    if (document.selection)
        document.selection.empty();
    else if (window.getSelection)
        window.getSelection().removeAllRanges();
});

Is this blue border styleable? How can I get rid of it?

Minimal Test Case (example)

Here is a reduced example of a page that manifests this behavior:

<!DOCTYPE html><a href="#foo">Test</a>

Rendering

enter image description here

cssfirefoxmobilefennec
4

0 回答 0

Related

8
shell - 在 Unix 上删除部分路径
2
android - Android:视图中的 RemoveAllItems 不会刷新大小
1
java - 当我部署一个新的 WAR 文件时,我应该将应用程序生成的 HTML 报告放在哪里,它们不会被删除?
1
c# - 为什么注销仅在本地有效,而在服务器上无效
4
html - 如何将自定义图像添加到按钮 (dojo 1.7)
0
javascript - 如何使用 JavaScript SDK 获取访问令牌以发布操作
1
asp.net - 在gridview模板字段中需要可变数量的下拉列表
3
jquery - 似乎无法捕捉到发送给我的参数帖子。也许第二双眼睛可以解决问题
2
c++ - c ++将dll放入程序中?
1
extjs4 - Extjs4 MVC,将侦听器添加到视口控制器中的 view.Viewport

Reference

php × 1429865
c/c++ × 756500
nginx × 49975
mongodb × 159057
mybatis × 3233
anaconda × 13410
pycharm × 14671
python × 1902243
vscode × 56040
docker × 110988
github × 49000
flask × 49129
ffmpeg × 24037
jmeter × 16910
matplotlib × 63493
bootstrap × 54641
Stack Overflow 中文网

遵从 CC BY-SA 知识共享许可协议。