Some trivial knowledge points in CSS
1: Order of adding the style of tag:
<Style type = "text/CSS">
A: link {color: #006600; font-size: 30px;}/* unaccessed link green */
A: visited {color: # ff0000; font-size: 30px; text-Decoration: underline;}/* accessed link red */
A: hover {color: #000000; font-size: 30px; text-Decoration: underline;}/* hover the cursor over the link */
A: active {color: #000066; font-size: 30px; text-Decoration: none;}/* selected link blue */
The data must be written in the above sequence, otherwise the effect may not be reflected.
In css definition, A: hover must be located after a: link and a: visited !! A: active must be located after a: hover !!
2: CSS browser compatibility:
A :! Important (limited function ):
With IE7! Important Support ,! The important method is only compatible with ie6. (note the writing method. Remember that the declaration position must be in advance .)
For example:
# Example {
Width: 100px! Important;/* IE7 + FF */
Width: 103px;/* IE6 */
}
B: CSS hack method:
General height of all browsers: 100px;
IE6 dedicated _ Height: 100px;
IE7 dedicated * + Height: 100px;
IE6 and IE7 share * Height: 100px;
IE7 and FF share Height: 100px! Important;
Ie9 Height: 100px \ 9;
Note that,CodeThe order of./* FF */* ie9 */* IE8 */* IE7 */* IE6 */
* + For HTML compatibility with IE7, the following declaration must be made on the top of HTML:
<! Doctype HTML public "-// W3C // dtd html 4.01 transitional // en" "http://www.w3.org/TR/html4/loose.dtd">