<rules>::=<selector> <左括號><declarations><右括號><declarations>::= <declaration>{<SEMICOLON><declaration>}[SEMICOLON]<SEMICOLON>::=分號<declaration>::=<property><COLON><value><COLON>::=冒號<value>::=<keyword list><keyword list>::=<keyword>{<SPACE><keyword>}<SPACE>::=空格通常會用空格做為value之間的分隔符,有個例外:As we've seen, CSS keywords are separated by spaces—except in one instance. In the CSS property font, there is exactly one place where a forward-slash (/) can be used to separate two specific keywords. Here's an example:h2 {font: large/150% sans-serif;}The slash separates the keywords that set the element's font size and line height. This is the only place the slash is allowed to appear in the font declaration. All of the other keywords allowed for font are separated by spaces.2.1.1selectorselector: defines which piece of the document will be affected.Selector通常是html元素,也可能是xml中允許任何元素。2.1.2 Declarations and Keywords2.2 Grouping2.2.1 grouping selectors將多個元素共用一個style,例子:新聞熱點
疑難解答