When a link gets the focus, the default is a dotted box. As shown in figure:
In Firefox can use-moz-outline:none; or Outline:none; To remove it. So we can write this:
code is as follows: A:focus {
Outline:none;
-moz-outline:none;
}
By the way, if you've ever used Safari and Chrome, you might find that the border appears shaded when the input box has the focus.
You can also use the Outline property if you want to remove the shadow effect.
code is as follows: Input,textarea {
Outline:none;
}
To be honest, just say is Firefox, now say IE. First of all, I regret that we have not found a better solution to remove IE link dotted box by CSS. So there's only one alternative, the Hidefocus attribute of the A tag (this property is unique to IE).
code as follows: <a href= "#" hidefocus= "true" > Links </a>
Note: JS script corresponding to the property name is: Hidefocus. The corresponding JS code should be:
code is as follows: Xxx.hidefocus = "true";
There is also a method that is not recommended. is to lose focus when the link gets the focus.
The
code is as follows: <a href= "#" onfocus= "This.blur ();" > Links </a>
This approach works, but it's too violent to use.