Reading journals of CSS: The Definitive Guide, 3rd Edition Chapter 1. CSS and Documents Dale 2012-03-23
May 21, 2015
Reading journals ofCSS: The Definitive Guide, 3rd Edition
Chapter 1. CSS and Documents
Dale 2012-03-23
Why CSS?
• Function– separate a document‘s structure from its
presentation 使 web 文档的结构与表现分离
– Easy of Use • a single rule can control all elements in the document.
• instead of
How to use?
• 3 way to Bringing CSS and XHTML Together +1
– The link Tag– @Import– Inline Styles 内联 use HTML attribute style
Somethings else in chapter 1
• 样式层叠性 cascade• Css 注释 /**/• Element 元素– 替换 (img)| 非替换元素 ()– 块元素 (div p)| 行内元素 em a strong
Basic concept 基本概念
• Element Selectors 元素选择器 – p body a …or XML lable.
• Declarations 声明– Example :
• Keywords 关键字 ( 属性值 )
– Special
2.2. Grouping
• 2.2.1. Grouping Selectors
• 2.2.2. Grouping Declarations
• 2.2.3. Grouping Everything
• 2.4.2. Selection Based on Exact Attribute Value
• 2.4.3. Selection Based on Partial Attribute Values
Table 2-1. Substring matching attribute selectors
• 2.4.4. A Particular Attribute Selection Type 特定属性选择