Show/Hide a CSS Bug that leads to

Source: Internet
Author: User
css| Display this section of CSS code is quite simple, the purpose is to use CSS to control the display of a paragraph of text and hide. At first I used the following code, it is amazing that they did not respond to my IE6.0, we do not believe that you can test it yourself.

<style type= "Text/css" >
a {font-size:12px;
Text-decoration:none;
height:50;}
a:hover {text-decoration:none;}
A span {font-size:12px;
Display:none;}
A:hover span {Display:block}
</style>
<a href= "#" >link<span> I was hiding content </span></a>

I checked the code carefully and couldn't find anything wrong. There is no way, I can only check error correction like normal, try to change the code in the CSS. When I changed the code in the hover pseudo-class link (as shown in the code), I suddenly found that the code could run.
In order to confirm whether the CSS really exists the bug, I specifically use the size, color, location and other styles to test, without changing the hover pseudo-class links, under the premise, can not get the normal situation should be the effect. So you can tell: when there is a pseudo-class link with the selector, there is a bug in the CSS style is not valid, I hope that the next version of CSS can fix this error.
a:hover {text-decoration:none;border:none;}
This allows us to know that some special CSS attribute declarations must be included in the hover pseudo class link to eliminate the bug. I used all the attribute declarations in CSS to try to solve the bug and found that only a few attribute declarations would solve the problem.
Border
Display
Postion
Overfilow
Background
The reason I'm using the "border:none" approach is because it eliminates some of the different CSS errors from Netscape 4.
Note: The bugs mentioned in this article exist in both IE5.5 and IE6.0.







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.