Remove the dotted box (ie, Firefox) around the link a tag)

Source: Internet
Author: User

I have never noticed that the original text-index will affect the dotted line of the tag (ie does not seem to be), and an ugly dotted line will be generated when I click it. Recently, during project rectification, this problem has been a long time. Therefore, I sorted out some documents. For reference.

I. Local Elimination

1. Firefox links sometimes generate ugly dotted lines because of the negative value of text-indent, but I think it is because the block element is not restricted. You can use outline: none to remove the dotted line when clicking a link. <A href = "#2" mce_href = "#2" style = "display: block; outline: none;"> aaa bb </a>

2. ie uses these three methods to eliminate the link dotted line

(1) <a href = "#1" mce_href = "#1" hidefocus = "true"> AAA </a>

(2) <a href = "#1" mce_href = "#1" style = "nofocus: expression (this. onfocus = This. blur () "> AAA </a>

(3) <a href = "#1" mce_href = "#1" onfocus = "Blur ()"> AAA </a>

Ii. global CSS elimination (available in practice)

A {BLR: expression (this. onfocus = This. Close ();}/* only supports IE, Which is inefficient when used too much */

A {BLR: expression (this. onfocus = This. Blur ();}/* only supports IE, Which is inefficient when used too much */

A: Focus {-moz-Outline-style: none;}/* IE does not support */

A: Focus {outline: none;}/* attributes added to many websites */

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.