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>