The CSS attribute disappears the dotted box when you click an image link.

Source: Internet
Author: User
I made a navigation bar yesterday. In order to save code, the CSS attribute uses a Line-height. The result is that every time I click the navigation bar, the mouse is over and it is terrible. An eye-catching dotted box does not include images or even images. The dotted box misplacement is very serious, and everything else is normal. In short, it was cool, and it was all in vain to have this dotted line.

In blue search and search, I saw a lot of code, and a lot of code is still very useful, but it is a bit too long, useful pure CSS (write a long ), JS is also useful (I will not use JS if I can use CSS)
Finally, I accidentally read an attribute.
The result is that the two CSS attributes are all OK.

Although I didn't find what I wanted most in blue, the spirit of sharing here is respectable, and the younger brother did not dare to share it exclusively. I just registered an account for this post today, we hope to provide some help to those who need this effect.

CSS
An outline is a line drawn around an element. It is located at the periphery of the border edge and can highlight an element.

The outline attribute is a short attribute used to set the outlines around an element.

Note: The contour line does not occupy space or must be a rectangle.

You can add this attribute a: active {outline: none} to the click link}
Unfortunately, it is invalid to add a: active {blr: expression (this. onFocus = this. blur ();} in IE ());}

That's it.
<Style>
A: active {outline: none; blr: expression (this. onFocus = this. blur ());}
</Style>
In this way, all links on the webpage are not dotted-box (text links and image links =)
Example:
<Style>
A: active {outline: none; blr: expression (this. onFocus = this. blur ());}
Img, a. img {border: 0}
</Style>
<A href = "#"> </a> <br>
<A href = "#"> </a> <br>
<A href = "#"> post </a>

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.