Css selector and css Selector
Tag Selector
H1 {}
Call
CATEGORY Selector
. H1 {}
Call <p class = "h1">
Id Selector
# I {}
Call
<P id = I> </p>
Intersection Selector
P. special {}
Call
<P class = "special> </p>
Super-basic CSS beginners-including selector usage
The jquery selector refers to CSS. jquery has several CSS versions.
CSS2.0, CSS2.1, and CSS3, including child selector, descendant selector, and attribute selector.
The selectors you mentioned above are in CSS2.1, but IE6 does not support
What are the CSS selectors and how to choose to use them in Webpage Design?
<Div id = "demo">
<Div class = "inner">
<P> <a href = "#"> link </a> </p>
<P> <input type = "checkbox" name = "" id = "/> </p>
</Div>
</Div>
Class selector. inner {width: 100px ;}
Id selector # demo {width: 100px ;}
Tag selector p {width: 100px ;}
Descendant selector p a {color: # f60 ;}
Pseudo class selector a: hover {color: # f00 ;}
Pseudo element selector a: after {clear: both ;}
Attribute selector input [type = checkbox] {margin-left: 10px ;}
Css3 Selector
Due to ie problems, the first four selectors are commonly used.