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
c++ - 将'_'更改为''根本不起作用
1
maven - 需要示例 Grails Maven 项目
2
clojure - 如何使用 Clojure 代理制作类 java 类?
4
android - Android ActionBarSherlock,SearchView `setOnCloseListener` 不起作用
1
c# - 异步与多线程
2
php - 如何用动态输入字段构建表格?
1
django - 列出所有相关对象并允许对相关对象进行分页
1
java - OSGi 服务类依赖项
3
c++ - 如何使派生类的成员只读?
3
arrays - 使用 grep 检查数组中是否存在多个 var

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