Comparative laminate three localization

1, layered meanings:
need to understand there is a declaration stacked conflict; conflict declared value of the property is the same but different; laminated is resolved.
Then we take a look at how these conflicts are resolved now.
2, layered process:
2.1 are prioritized
each statement has a priority, when a conflict occurs, a high priority will be retained, with low priority will be eliminated, with a statement of his priorities and important source sex-related.
If the property back to keep up with [! important], it means that an important statement, or that general statement.
Priority from low to high in the following order:
(1) the default browser that declarations; and
(2) user stylesheet general statement;
(3) OF stylesheet general statement;
(4) OF stylesheet the important statement;
(5) the user key style sheet declaration;
2.2 Comparative specificity
specificity of a statement, size range depends rules apply. The larger the scope rules apply smaller specificity.
Low specificity as follows:
(1) the pattern row; be written by <style> tag attributes;
(2) ID selector; format; #awesome {
document
}
(3) in the selector; format; .awesome {
document
}
(4) an element selector; format; P {
document
}
(5) wildcard selector; format; * {
document
}
2.2.1 weighting value
! → Infinity Important
style:. 1 0 0 0
id: 0 0 0. 1
class properties: 0010
elements pseudo-class: 0001
2.3 sequence comparison Source
Selector: following
id Selector: {name} #id
element selector : element name {}
attribute selectors: attribute name} {
wherein among they may be combined in different ways, as follows:
descendant selectors: format: ul li {} {}
progeny selector: format: UL > li {} {}
pseudo class selector: format ol li: nth-child ()
General (wildcard) selector: ...... * {}
class selector: {} class name format.
inheritance:
the child will automatically have a parent element some elements of CSS properties. Text class attributes will be inherited.
List:
1. ordered list: format: <OL>
<li> nnn </ li> Display results: 1.nnn will automatically give you sort
<li> MMM </ li> 2.mmm
</ OL>
can have more sub-levels.
2. unordered list: Format: <UI>
<UI> NNN </ UI> shows the results:. Nnn is displayed in front of a black specks
<UI> MMM </ UI> MMM.
</ UI>

<di> nnn </ di> Display results: nnn will result in the lower row moves back a little
<DI> MMM </ DI> MMM
</ DI> can have multiple children
######
List-style: to style list items can have: none: cancel list item style disc: the default marker is a filled circle circle: mark is a hollow circle square: tag is closed squares decimal: digital cower-alpha, wpper-alphe: size English. There are many
three localization system
1, the normal stream 2, float, 3, absolute positioning
1, any element will have a positioning system
2, a conventional flow: CSS without interference, the block elements on a separate line, width and height can be set , inline elements side by side, the width and height automatically.
3, float: Format: 1, float: none: no float
2, float: left: left float: left float upward to the left box arrangement
3, float: right: floating right: the right to right upward floating box
4; If the remaining space can not be put down boxes floating box moves down until the moment there will accommodate his left to the right place
######
box
, a distance of one element and another element is margins
2 , margin: margin podding: padding border: margin
3, podding: 10px four weeks, 10px, 20px: top, right 10px, 20px, 30px: upper, right, down 10px.20px, 30px, 40px: top, right , down, left,
but as long as the change from the side of the format can be so; podding - on top
Right right
margin format: 10px solid red left left
dashed: the dotted line bottom
dotted: solid line
4.podding not negated
5, the vertical upward direction if the two adjacent margins. Folding will take a large value,, it is the sum of the horizontal line.

Guess you like

Origin www.cnblogs.com/mobuneng/p/12050626.html