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

2
ruby-on-rails - 在 Rails 中处理 Oauth Consumer Key 和 Secret 的正确方法是什么?
1
javascript - 用户权限处理
1
sql - 查找过去两个日历年的先前等效日期
1
sql-server-2008-r2 - 存储过程以获取表列表和使用所有数据库中的这些表的存储过程
2
tomcat - 在 Netbeans 7.1.2 中使用 Thymeleaf
3
d - 如何在 DMD 2.060 下解决此联合尺寸/对齐要求
3
javascript - 追踪 JavaScript 内存泄漏的工具
2
c# - 如何解析具有嵌套元素(complexType 和 simpleType 元素和属性)的 xsd 文件?
3
perl - 我可以定义一个可以像内置一样在任何地方调用的子程序吗?
1
asp.net-mvc-3 - mvc3 razor 条件包装器 div

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 知识共享许可协议。