Referenced:
CSS选择器,看这篇就够了
学习一个东西的第一件事:清楚概念!!
CSS Reference
An exhaustive reference for seasoned Web developers describing every property and concept of CSS.
一份用於描述CSS的每個屬性和經驗豐富的概念给web开发人员的详尽的参考。
A step-by-step introduction to help complete beginners get started. It presents all the needed fundamentals.
A collection of demos showing the latest CSS technologies in action: a boost for the creativity.
Describes the syntax and forms of the language: CSS的语法和形式 and introduces fundamentals like specificity and inheritance, 像特异性和继承,the box model and margin collapsing, stacking and block-formatting contexts, or the initial, computed, used, and actual values. Entities like CSS shorthand properties are also defined.
Box model:

Syntax
The basic goal of the Cascading Stylesheet (CSS) language is to allow a browser engine to paint elements of the page with specific features, like colors, positioning, or decorations.
CSS, 让browser给特定的元素加上特定的颜色,位置,或者一些别的修饰。
CSS Declarations声明

Both properties and values are case-sensitive in CSS. 冒号前后各加一个空格。
CSS Reference :https://developer.mozilla.org/en-US/docs/Web/CSS/Reference


CSS Rulesets
Each (valid) declaration block is preceded by one or more selectors which are conditions selecting some elements of the page.

the CSS standard defines which one has precedence over the other and must be applied: this is called the cascade algorithm.
CSS statements

There are different kinds of statements:
1. Rulesets (or rules) that, as seen, associate a collection of CSS declarations to a condition described by a selector.
2. At-rules that start with an at sign, '@' (U+0040 COMMERCIAL AT), followed by an identifier and then continuing up the end of the statement, that is up to the next semi-colon (;) outside of a block, or the end of the next block. Each type of at-rules, defined by the identifier, may have its own internal syntax, and semantics of course. They are used to convey meta-data information (like @charset or @import), conditional information (like @media or @document), or descriptive information (like @font-face).
网友评论