CSS Cheat Sheet - CSS - ILoveJackDaniels.com
来源:百度文库 编辑:神马文学网 时间:2024/04/27 18:29:27
CSS Cheat Sheet
Posted inCheat Sheets,CSS on April 30, 2005
The CSS cheat sheet is designed to act as a reminder and reference sheet, listing all selectors (as of CSS 2.1) and properties. It includes a visual example of the box model, unit reference for CSS units and the various media types CSS makes allowance for. A description of what is on the cheat sheet follows, or if you are impatient, you can go straight to the full size CSS cheat sheet.
PNG, 97KBPDF, 379KB
Properties List
The CSS specification includes a lot or properties, many of which are often forgotten or overlooked. Many of these are shorthand properties, defining many properties in one go. The outside columns of the cheat sheet list all available CSS properties.
Syntax
Syntax is one area in CSS where many people stumble when learning it. Often, designers new to the language can spend a great deal of time trying to work out why a specific style isn‘t being applied, and many times it is either due to a syntax error or inheritance.
Selectors
Given the number of possible selectors in CSS, it is no wonder some people often become confuse. Mixing up ID and Class selectors is easy enough, without throwing sibling, child, attribute and language selectors into the mix. This section of the cheat sheet lists selectors and shows which element(s) those selectors would apply to.
Pseudo-Selectors
Pseudo-selectors are used when defining styles for elements that either do not exist, or are in a particular state. This section lists various of the pseudo-selectors.
Please note - I have left the :before and :after pseudo-selectors off this list, as I felt generated content was too complex to add to this sheet and still define in a way that made that area of the sheet usable.
Media Types
One of the reasons CSS is so powerful is that it makes allowance for different types of devices accessing the same data. This is controlled through media types, and though they are not used in CSS as much as many would like, the chances are that this will change and media types will become more important. This section lists the various media types defined in CSS 2.1.
Box Model
The box model is one thing that consistently trips up those new to CSS. Apart from major browsers not all supporting it correctly, its definition can be at first confusing. The box model section of the page aims to make this clearer.
Units
CSS allows the author to define dimensions and colours in many different ways, which can be especially useful when combined with media types. This section of the sheet lists the various units in CSS and explains what they mean.
Properties that Inherit
Inheritance is another area that trips up new and experienced CSS developers alike. An element within another element can use the same value as its ancestors. For example, if you define a font family for a
Posted inCheat Sheets,CSS on April 30, 2005
The CSS cheat sheet is designed to act as a reminder and reference sheet, listing all selectors (as of CSS 2.1) and properties. It includes a visual example of the box model, unit reference for CSS units and the various media types CSS makes allowance for. A description of what is on the cheat sheet follows, or if you are impatient, you can go straight to the full size CSS cheat sheet.
PNG, 97KBPDF, 379KB
Properties List
The CSS specification includes a lot or properties, many of which are often forgotten or overlooked. Many of these are shorthand properties, defining many properties in one go. The outside columns of the cheat sheet list all available CSS properties.
Syntax
Syntax is one area in CSS where many people stumble when learning it. Often, designers new to the language can spend a great deal of time trying to work out why a specific style isn‘t being applied, and many times it is either due to a syntax error or inheritance.
Selectors
Given the number of possible selectors in CSS, it is no wonder some people often become confuse. Mixing up ID and Class selectors is easy enough, without throwing sibling, child, attribute and language selectors into the mix. This section of the cheat sheet lists selectors and shows which element(s) those selectors would apply to.
Pseudo-Selectors
Pseudo-selectors are used when defining styles for elements that either do not exist, or are in a particular state. This section lists various of the pseudo-selectors.
Please note - I have left the :before and :after pseudo-selectors off this list, as I felt generated content was too complex to add to this sheet and still define in a way that made that area of the sheet usable.
Media Types
One of the reasons CSS is so powerful is that it makes allowance for different types of devices accessing the same data. This is controlled through media types, and though they are not used in CSS as much as many would like, the chances are that this will change and media types will become more important. This section lists the various media types defined in CSS 2.1.
Box Model
The box model is one thing that consistently trips up those new to CSS. Apart from major browsers not all supporting it correctly, its definition can be at first confusing. The box model section of the page aims to make this clearer.
Units
CSS allows the author to define dimensions and colours in many different ways, which can be especially useful when combined with media types. This section of the sheet lists the various units in CSS and explains what they mean.
Properties that Inherit
Inheritance is another area that trips up new and experienced CSS developers alike. An element within another element can use the same value as its ancestors. For example, if you define a font family for a
, and next a within it, the will use the same font family as the
, unless explicitly set to be different. Not all properties inherit though, and this section lists (alphabetically) those that do.
So now that you know what it does, please feel free to print out the CSS cheat sheet:
PNG, 97KBPDF, 379KB
Please note: If you wish to link to the CSS cheat sheet from elsewhere, please link to this page so others find the description, rather than linking directly to the sheet.
Update - 4th July 2005
Brian Warren has created aCSS Cheat Sheet dashboard widget for Mac OS X (and he was kind enough to check with me first, which I really appreciated). (His site is also well worth checking out - a nice use of perspective really helps it stand out).
And finally, if you like the cheat sheets, and want to say thanks, I do have anAmazon Wishlist. Thankyou very much to those who have already hunted it down and sent me something nice - I‘m very grateful!
77 comments
Top of Page
_xyz
So now that you know what it does, please feel free to print out the CSS cheat sheet:
PNG, 97KBPDF, 379KB
Please note: If you wish to link to the CSS cheat sheet from elsewhere, please link to this page so others find the description, rather than linking directly to the sheet.
Update - 4th July 2005
Brian Warren has created aCSS Cheat Sheet dashboard widget for Mac OS X (and he was kind enough to check with me first, which I really appreciated). (His site is also well worth checking out - a nice use of perspective really helps it stand out).
And finally, if you like the cheat sheets, and want to say thanks, I do have anAmazon Wishlist. Thankyou very much to those who have already hunted it down and sent me something nice - I‘m very grateful!
77 comments
Top of Page
_xyz
CSS Cheat Sheet - CSS - ILoveJackDaniels.com
Ruby on Rails Cheat Sheet - Ruby On Rails - ILoveJackDaniels.com
css
Python Cheat Sheet
Watir : Cheat Sheet
XSS (Cross Site Scripting) Cheat Sheet
Cheat Sheet – Architecture Meta Frame (AMF)
实时切换CSS样式 - SharkUI.com
实时切换CSS样式 - SharkUI.com
什么是css?css介绍
CSS布局口诀 CSS BUG顺口溜 - 卡卡代码站_KKCode.com
CSS简介-CSS教程 网页教程与代码 站长网教程中心_www.admin5.com/ht...
CSS 锦囊
CSS十大密技
CSS Syntax
css 样式
Div+CSS
Div+CSS
CSS Syntax
CSS是什么
css样式
Css布局
CSS选择器
CSS定位