CSS browser compatibility
Display: inline-block in IE6/7
There are two methods: first, declare the element display: inline-block, trigger its layout, and then declare it as display: inline on the second style, for example:
The Code is as follows:
. Test {display: inline-block;/* other styles ...*/}
. Test {display: inline ;}
The second method (recommended) triggers layout using the Css proprietary prefix of IE6/7 (how does it feel like setTimeout of js ):
The Code is as follows:
. Test {display: inline-block; * zoom: 1; * display: inline ;}
IE6 Double Floating line spacing
In IE6, when a div moves to the left of another div with a margin-left style, the left margin of the div is double that defined by the style, similarly, if it is float to the right and margin-right, the effect is the same. However, the margin of the floating div is correct, but the first one has this problem.
In this case, the solution is: simply add a _ display: inline; style to the div.
Css hack for IE6-IE10
The Code is as follows:
P {
Color: black;/* IE10 */
Color: orange \ 0;/* IE8, IE9 */
* Color: blue;/* IE6, IE7 */
_ Color: red;/* IE6 */
}
: Root p {
Color: yellow \ 0;/* IE9 */
}
In IE7/8, a PNG Image has a black background.
That's because you have used the filter effect, for example, filter: alpha (opacity = 100);. just remove it.
Elements in IE7/8 disappear for no reason, are invisible, and cannot be clicked
There is something in other browsers, But it disappears without reason when it comes to IE7/8. In this case, try to add background: red to the element, or remove text-indent:-9999em; font-size: 0, change to font-size: 18px; text-indent: 0;, and then you will find that the elements that disappear have finally appeared again. To solve this problem, add the background color to the element in IE7/8. However, if you do not want this element to be visible, add opacity: 0; filter: alpha (opacity = 0 );
Style loading in IE7/8 is incomplete
It should be because the charset Declaration of the css file is inconsistent with the encoding of the file itself. Just correct this.
Record these records for the time being. If you need to update them later, you can collect them and send them to me. This article will be updated continuously.