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
android - 其他应用程序在我的应用程序之前收到消息
1
c++ - 从 Boost::Tokenizer 中删除重复项?
2
mysql - mysql查询中的错误-使用日期检索数据
1
css - 包装动态元素
1
django - 让 Django 首先搜索当前应用程序的消息文件 (.mo)
1
php - 设置在线服务器数据库并编写我的 android 本机应用程序以与之交互
3
c# - 在 C# 中使用 LINQ 获取分页结果
2
jquery - jQuery:选择 tr 的 td 满足多个条件
1
apache - 为我的 Web 应用程序规划 url 重写
2
c# - 如何只允许在 DataGridTextColumn 中输入小数点 2 后的值

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