Firefox hyperlink click to remove the expanded unsightly dotted line solution _ experience exchange

Source: Internet
Author: User
In Firefox, When you click a link, a dotted border appears around it. This example is used everywhere. When I write this article in the WordPress background, I click the widgets on the right to see this problem (the top right corner of the image). In some special cases, for example, when you create a navigation menu, the validity period may be very bad because Firefox will incorrectly expand the border of the link:
Enter about: config in the address bar of Firefox, and press Enter. There is a configuration item called "browser. display. focus_ring_width", which is changed to 0. The border will not appear when you click the link. In this case, the border is not indicated when the focus falls on the button. As a developer, setting this attribute in a browser is nothing more than hiding your ears.
This is actually the outline attribute that Firefox adds to this label when it is in the focus state (pseudo selector-a: focus.
The correct solution is to add a rule to CSS:
A {
Outline: none;
}
Or narrow down the scope:
A: focus {
Outline: none;
}
The latter causes the left mouse button to be pressed on the link, and the outline of the dotted line will still be displayed during this period of time.
Most of my websites write this rule in CSS. Maybe Firefox should consider removing the default outline.

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.