What are the common compatibility problems of css in various browsers?
This article mainly explains "what are the common css compatibility problems in various browsers". The explanation in the article is simple and clear and easy to learn and understand. please follow the editor's train of thought to study and learn "what are the common css compatibility problems in various browsers?"
I. the problem of dotted frames of links
The code is as follows:
The code is as follows:
/ *
* A, img, input and other tags will be clicked with dotted frames
* remove it
, /
.noDashedBox {
Outline:0
Blr:_expression (this.onFocus=this.blur ())
}
2. Fixed positioning
The code is as follows:
The code is as follows:
/ * css * /
.fixedTop {
Position:fixed
Top:100px
Left:50%
Margin-left:500px
_ position:absolute
_ top:_expression (eval (document.documentElement.scrollTop + 100))
}
.fixedBottom {
Position:fixed
Bottom:50px
Left:50%
Margin-left:500px
_ position:absolute
_ top:_expression (eval (document.documentElement.scrollTop + document.documentElement.clientHeight-70))
}
3. Png background picture transparent: for ie6
The code is as follows:
The code is as follows:
/ *
*
* ie6 png8 background cannot be located
, /
.pngOpacity {
Height:228px
Background:url (image/png_test.png) no-repeat
_ background:none
_ filter:progid:DXImageTransform.Microsoft.AlphaImageLoader (enabled='true', sizingMethod='crop', src='image/png_test.png')
}
The code is as follows:
/ / png transparent js solution
If (! window.XMLHttpRequest) {
Window.attachEvent ("onload", enableAlphaImages)
}
Function enableAlphaImages () {
For (var item0; I