Now Ie6/7 browser font-size:0 and text is not 0, the page runs when the text of the caption becomes a small black dot.
IE6 The default font size is roughly between 12-14px, and when you try to define a DIV that is less than this default value, IE6 will be adamant that the height of the layer should not be less than the row height of the font. So even if you use height:5px; To define the height of a DIV, the actual display under IE6 is still a layer of 12px or so high
Solution One
To resolve this problem, you can enforce the font size of the div, or define the overflow property to restrict the automatic adjustment of the div height. Like what:
The code is as follows |
Copy Code |
<div style= "HEIGHT:5PX; font:0px Arial; line-height:0; " ></div> Or <div style= "HEIGHT:5PX; Overflow:hidden; " ></div> |
It's worth noting that setting font-size:0 When the height of this container is minimum 2px, if you want to set the DIV height to 0 or 1px, you need to use Overflow:hidden; To achieve.
Solution Two:
1, set line-height:0;
2,text-indent:-9999em
Summarize
Use the line-height:0 to solve the Ie6/7 browser small black point problem, also can use the second method text-indent:-9999em to solve the small black spot problem.