CSS Remove dotted box when clicking on link

Source: Internet
Author: User

When clicked, the link will appear dotted, even if it is released, it still exists, sometimes it is not beautiful. Since it's not good-looking, don't want it. How to get rid of it?

Method One

IE can use its proprietary HTML properties: Hidefoucs, adding hidefocus= "true" property to the label's structure. That

<a href= "http://www.xker.com/" hidefocus= "true" title= "three networking" > three networking </a>

And in the Firfox browser is relatively easy, directly to label A to define style outline:none; On it, namely:

. Hidefocus {

Outline:none;

}

Method Two

CSS expression can also be used to control, but not recommended, after all, expression in performance problems.

. Hidefocus {

Hide-focus:expression (this.hidefocus=true); * For IE 5+ * *

Outline:none; * for Firefox 1.5 + * *

}

In addition to links, the CSS applies to input and button labels as well.

Method Three

Save the following code as a LINK.HTC file:

Link Style add:

A

Behavior:url (LINK.HTC);

}

There is no problem with IE, but the dotted box still exists in FF. Add a style definition to resolve this issue:

A:focus {

outline:0;

}

So IE, FF in the dotted line does not exist.

Note: More wonderful articles please pay attention to the triple Web Design Tutorial section.

Related Article

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.