17
Reading journals of CSS: The Definitive Guide, 3rd Edition Chapter 1. CSS and Documents Dale 2012-03-23

Reading journals of CSS权威指南

  • Upload
    keke302

  • View
    234

  • Download
    4

Embed Size (px)

DESCRIPTION

Study css-report:Reading journals of CSS: The Definitive Guide, 3rd Edition

Citation preview

Reading journals ofCSS: The Definitive Guide, 3rd Edition

Chapter 1. CSS and Documents

Dale 2012-03-23

What’s CSS?

• Cascading Style Sheets (CSS) • Example

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

Chapter 2. Selectors选择器

Dale 2012-03-23

Detail Description

• p is a selector• font-size is a property• 12px is a value

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.3. Class and ID Selectors

2.4. Attribute Selectors

• XML

• 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 特定属性选择

2.5. Using Document Structure

• 2.5.1. Understanding the Parent-Child Relationship

2.5.2. Descendant Selectors

2.6. Pseudo-Classes and Pseudo-Elements 伪类与伪元素

Pseudo-Elements

• The end of Chapter 2.