Under normal circumstances
code is as follows:


<Style type="text/CSS" >
div {background: red!!! Important; Background: blue}
</style>

in addition to IE6, other browsers display background to red, it is! The important role, which means that as long as I am here I am the most important, nothing can replace me, didn't see is a! Plus a word of English important? The very image, is very apt. IE6 here will be displayed in blue background, not 6 is not supported! Important, but it will appear after the sequence of statements in accordance with the style of the front cover, don't know at this point it has! Important, it is no one. This is one of the widely circulated IE6 hack. And if it will display the normal background in red:

  code is as follows:  


<Style type="text/CSS" >
div {background: blue; Background: red!!! Important; }
</style>

to look at four special sign [0.0.0.0]
from left to right, to a certain position + 1 at a time, before a period of a period after the landslide has the irrefutable. No matter how a numerical value can never be more than before after a 1. , inline style
1
A: [1.0.0.0]
B: inline style style and JS control object, the document. The getElementById (" demo") . The style. The color=" Red";
the two belong to the same level, but the general situation is under control of JS inline style high priority, this has nothing to do with the order that has a relationship with nature, for DOM manipulation is often in the DOM tree after completion of loading.
2, and the ID selector 0.1.0.0
3, classes, attributes, pseudo-class selectors 0.0.1.0
4, the element tag, pseudo element selector/0.0.0.1
about CSS selectors can view or the W3C CSS manual, not repetitive.
note pseudo-class selectors under
code is as follows:


<Style type="text/CSS" >
div {background: red!!! Important; Height: 20 px; }
# not {background: green; }
not {background: blue; }
</style>

  code is as follows:  


<Div class="not" id="not" style="background: yellow >" </div>

  code is as follows:  


<The script type="text/javascript" >
document. GetElementById (" not "). The style.css. Background="black";
</script>

the final display background in red, this should not have what problem,! Important in which changes the priority, then the JS code won't change priority.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
another Demo2
code is as follows:


<Style type="text/CSS" >
div {background: red!!! Important; Height: 200 px; }
# demo2 {background: green; }
demo2 {background: blue; }
</style>

  code is as follows:  


<Div class="demo2" id="demo2" style="background: yellow! Important >" </div>

  code is as follows:  


<The script type="text/javascript" >
document. GetElementById (" demo2 "). The style, background="black";
</script>

Internet explorer 6, 7 shows red
FF2 + shows yellow
Opera9 + red

Safari shows yellow -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
­ Demo3:

  code is as follows:  


<Style type="text/CSS" >
div {background: red!!! Important; Height: 200 px; #}
demo3 {background: green; }
demo3 {background: blue; }
</style>

  code is as follows:  


<Div class="demo3" id="demo3" style="background: yellow! Important >" </div> ­

  code is as follows:  


<The script type="text/javascript" >Demo3
document. GetElementById (" "). The style.css. Background="black! Important";
</script>

Internet explorer 6, 7 shows red
FF2 + shows yellow
Opera9 + black
according to Safari shows black
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
­ Explain the two examples above
code is as follows:


<Style type="text/CSS" >
div {height: 200 px; Width: 200 px; Background: red; }
b {background: green; }
a {background: blue; }
</style>
</head>
<Body>
<Div class="b" 2 style="background: pink;" >
</div>
</body>

div style shows the style of the blue color.
all learn front-end industry technology, playing through all cities around Beijing. Then I will go back to that life I have my place, because there is relatives is home.
# 0 - #


This concludes the body part