css inheritance: descendant elements can inherit from ancestor element of the text style, the style can not inherit the box.
Inheritance taxes: look at the principle of proximity, if the same close look at the weights, weights, like to see the written order
css laminate of: an element with a plurality of selectors can be selected, simultaneously loading pattern on the label, if the attribute is repeated, there will be laminated
Who overlap: small weight, the weight of the selected element, watching weight, significant weight stack stacked right as written in front of the back.
Not selected elements, see inheritance.
! Important: the right to revert to rise to a maximum of a property, but not for the principle of proximity
font: bold (bold font) font size / line-height "font"
font-style: normal normal
italic Italic
oblique italic
Text justification: text-align: left, right, center
Indent text: text-indent: 2em ----- em: in characters, px: pixels, a percentage of the parent box is the width of the reference
Text-decoration: text-decoration: none; normal, unmodified
underline; Underline
line-through; strikethrough
overline; overline
All text, default attributes are none (except a tag)
Box Model
Box attributes are: width, height, within the border, the border, an outer border
Width and height: width, height; width and height is the place where the actual content
Padding: padding: four value method; sequence, the upper, right, down, left
Ternary method; sequence, the upper, right and left, the
Two value method; the order is down, left and right
Single Value; all margins are the same
Common: If a three padding and other padding is not the same, the first set value method generally single, whose special, then a single attribute set individually
Border: border ---- outermost region of the box range, is a composite property
Width: border-left-width
Line Color: border-color
Line shape: border-style
Attribute value classification: solid solid line
dashed dotted line
double double lines
Dotted broken line point
groove recessed border effect
ridge protruding border effect
SUMMARY recessed area inset effect
SUMMARY outset region projecting effect
Margin: the distance between the box and the box margin -----
In general, the height to the box is not provided, but a support element with a high content of internal
The purpose, in order to ensure that our elements add or remove content when the height of the content can be highly adaptive changes.
In practice, the front end of styles and structures are built person, the actual text introduced by the background art, the number of prescribed contents is not necessarily required to leave the range can be controlled.
Knowledge of one of the above cases, do not necessarily set the height
Setting overflow hidden content attribute ---------- voerflow: hidden
The remaining width ---- provided only on the left margin, right margin 0
margin collapse
If two adjacent boxes, have vertical margins, the combined generation, which is displayed the large margins which
If his son box, outside the box from a sub do not use margin, to use the parent's padding box distraction, or forced to the parent box plus a border
Center
Text Center: text-align: center
Vertical direction:
Single-line text center: line height high box
Multiple lines of text vertically centered: highly adaptive, content distraction height, we distraction blank area within a single margin value method
Box center: sub-box centered within the parent box
Horizontal center: margin: 0, auto
Vertical center: The above text is centered vertically with similar
His son box model
Sub box can not exceed the overall footprint of the content area of the parent box
If not set the width of the sub-box, automatically hold over the parent box and a width of 100% of the parent case, if the frame is also provided and padding, automatically reduce the width inward,
No manual is to reduce the width