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

1
html - 将一个文本框放置在另一个文本框下方,没有任何间距
1
javascript - Ember.js + Rails 出错 - 未定义的“Ember.Router.extend”
2
image - HTML5画布,绘制后缩放图像
3
ruby - Xpath:直到一个节点的所有节点(Wikiquote.org)
1
php - WordPress 联系表格电子邮件为 PDF
1
php - 用于扩展的 Doctrine2 额外列或表
1
c# - KendoUI 树视图:远程数据问题
2
c++ - 隐藏第三方 C++ 头文件的内容
1
regex - pig:如何提取一个包含所有字符的元组?
1
c# - Populate silverlight grid from a text file

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