Some time ago in the writing style of the time to find this problem, although the resolution of the bug is still recorded, so as not to appear again such a problem.
Demo Code:
<!DOCTYPE HTML><HTMLLang= "en"><Head> <MetaCharSet= "UTF-8"/> <Metahttp-equiv= "X-ua-compatible"content= "Ie=edge,chrome=1"/> <Metaname= "Renderer"content= "WebKit"/> <Metaname= "keywords"content=""/> <Metaname= "description"content=""/> <title>A:hover setting the upper and lower borders to expire under IE6 and IE7</title> <style>a{text-decoration:None;}a:hover{Color:#f00;Border:2px Solid Orange;} </style></Head><Body> <ahref= "javascript:;">A:hover setting the upper and lower borders to expire under IE6 and IE7</a></Body></HTML>
Through the demo we can find that in IE6 and IE7 browser, the mouse cursor up and down the border does not show only the left and right border display, and other browsers are normal display, why?
Because the a tag Haslayout property is false in IE6 and IE7, what is Haslayout? Please Baidu, here I will not say more.
Since know is haslayout problem, then only need to set up haslayout on the line, set up a lot of methods, the following list of commonly used 2 ways:
a:hover {position:relative;} a:hover {Zoom:1;}
Ps:
IE under 80% bugs are caused by the element is not haslayout, so if you encounter difficult to explain the problem in IE, the first thing to do is to add haslayout to the element.
"CSS" a:hover setting the upper and lower borders to expire under IE6 and IE7