CSS authoritative guidelines for CSS declarations, pseudo-classes, Text processing-(briefly note i)

Source: Internet
Author: User

Meaning of the 1.CSS cascade

The back will overwrite the previous style

2. Each element generates a box, also known as a box.   3. Replace elements and non-replacement elements. img This element is meaningless if you do not specify the external path of SRC. He is replaced by an image file other than the document itself. most are non-replacement elements. The content in span is by the user agent.
 

4. Parent-child and ancestor between elements

If an element is directly above the other element, they have a parent-child relationship.

If the path from one element to another is going through two or more layers, then this is the relationship between the ancestor and the descendant.

  5.animate Animation Overlay Solutionput stop in front of animate when using  6. particularity, inheritance, Cascade  7. Intrinsic reasons for declaring precedenceThe first 0 in O,o,o,o is reserved for the inline style declaration. Inline style has the highest precedence. And of course there is a use:! Important, to force a change in priority.   8. Direction of successioncan only inherit down, cannot inherit. One exception : The BODY element's background style can be up to the HTML element.   9. Pseudo-Class(1) using Pseudo-class selectors is pseudo class selector (2) pseudo element selector : 4 pseudo elements defined in CSS2.1: First-letter (applied to block-level elements): First-line (applied to block-level elements): Before: After               10.border can't inherit it .  11.html and XHTML define class selectors and ID selectors as case sensitive  import multiple CSS in 12.CSS: Using @important@important URL (styl.css)
  13. Font Download ProblemCSS2 supports download styles and defines response properties, but Web browsers always refuse to download fonts.   14. Font: font-family: ' x x ', ' XX ', AAIf there are special symbols or spaces in the font, you must enclose them in quotation marks ., this is a recommended practice.   15. Text Processing (1) Horizontal alignmentText-align: Applies to block elementsUnlike Center, it causes the element to be centered, not just text (2) Paragraph indentText-indent: Applies to block elements, which can be positive or negative. Negative values are used for hanging indents. if it is a inline element, you can use the left padding.   (3) Vertical alignmentRow Height: Line-height refers to the distance between the baseline of a line of text. One is that the setting of the row height of each element is displayed, which is not very practical. Another way is to set a scaling factor.  To construct a line of text: each element in a line of text generates a content area, which is determined by the size of the font. This content area generates a inline box, and if there are no other factors, the inline box is exactly equal to the element's content area. the line spacing generated by Line-height is one of the factors that increase or decrease the height of the inner frame of each row.   vertical-align: Action on inline elements and replacement elements  (4) sub-interval and letter spacingWord interval: word-spacingthis length is increased to the standard interval between words. Letter spacing: letter-spacingThe difference between the two is that the letter interval modifies the spacing between characters or letters.   (5) Text conversionText-transform  (6) Text decorationtext-decoration  (7) Text ShadowText-shadow  (8) dealing with whitespace : In fact, HTML has done this, and it compresses any whitespace into a single whitespace character. White-space  

CSS authoritative guidelines for CSS declarations, pseudo-classes, Text processing-(briefly note i)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.