Recommend the following code
a {outline: none; /* for Forefox * / }
a {star:expression(this.onFocus=this.blur()); /* for Ie*/ }
The following code is more troublesome
We use htc files to solve this problem. Save the following code as a link.htc file on the home page.
<script>
<br>function hscfsy(){
<br>this.blur();
<br>}
<br></script>
Write the following code in the HTML file to create a link:
jb51.net
We start defining the CSS style for this link:
a {
display:block;
width:100px;
height:30px;
Line-height:30px;
text-align:center;
}
a:hover {
Background:#ddd;
}
CSS styles determine the appearance of links, block elements with a certain width and height. Text is aligned horizontally, left and center.
We add an attribute to the style of the a tag. Use this to remove the dashed border of a link:
a {
display:block;
width:100px;
height:30px;
Line-height:30px;
text-align:center;
Behavior:url(line.htc);
}
We run the following code to see the effect:
We previewed it in IE7 and IE6, and there is no problem. But the dashed box still exists in FF.
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn