CSS thorough research (1)
Github Pages Blog
Basic Selector
Tag Selector h1 {...}
Category. class_name{.}, two classes simultaneously, such as class = ' One two ', conflicts take the former
ID selector #id {...}
Composite selector: Two or more selectors that connect in different ways
Intersection
H3.class_name {...}
The first one must be a tag selector, the second must be (category selector) or (ID selector), no space in the middle, must be written continuously
The A_selector selector, B_selector is also a plurality of selectors
Descendant Selector
div p {/* div below P, including all Descendants */}
direct descendants of Div>pdiv
CSS Inheritance
The contained small container inherits the style of the large container containing it.
As a result, EM inherits the H1 underline.
CSS Precedence
Inline style (style=) > ID style (#id) > class style (. Class) > Markup Style (div)
Two class conflicts, take the former
The above is the CSS thorough research (1) of the content, more relevant content please pay attention to topic.alibabacloud.com (www.php.cn)!