📄 about.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html lang="en"><HEAD><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><TITLE>About the CSS2 Specification</TITLE><link rel="stylesheet" href="style/default.css" type="text/css"><link rel="prev" href="cover.html"><link rel="next" href="intro.html"><link rel="contents" href="cover.html#minitoc"><link rel="CSS-properties" href="propidx.html" title="properties"><link rel="index" href="indexlist.html" title="index"></HEAD><BODY><div class="navbar" align="center"><p><a href="cover.html">previous</a> <a href="intro.html">next</a> <a href="cover.html#minitoc">contents</a> <a href="propidx.html">properties</a> <a href="indexlist.html">index</a> </div><hr class="navbar"><H1 align="center">1 About the CSS2 Specification</H1><div class="subtoc"><p><strong>Contents</strong> <ul class="toc"> <li class="tocline2"><a href="about.html#q1" class="tocxref">1.1 Reading the specification</a> <li class="tocline2"><a href="about.html#q2" class="tocxref">1.2 How the specification is organized</a> <li class="tocline2"><a href="about.html#q3" class="tocxref">1.3 Conventions</a> <ul class="toc"> <li class="tocline3"><a href="about.html#q4" class="tocxref">1.3.1 Document language elements and attributes</a> <li class="tocline3"><a href="about.html#property-defs" class="tocxref">1.3.2 CSS property definitions</a> <ul class="toc"> <li class="tocline4"><a href="about.html#q6" class="tocxref"> Value</a> <li class="tocline4"><a href="about.html#q7" class="tocxref"> Initial</a> <li class="tocline4"><a href="about.html#q8" class="tocxref"> Applies to</a> <li class="tocline4"><a href="about.html#q9" class="tocxref"> Inherited</a> <li class="tocline4"><a href="about.html#q10" class="tocxref"> Percentage values</a> <li class="tocline4"><a href="about.html#q11" class="tocxref"> Media groups</a> </ul> <li class="tocline3"><a href="about.html#shorthand" class="tocxref">1.3.3 Shorthand properties</a> <li class="tocline3"><a href="about.html#q13" class="tocxref">1.3.4 Notes and examples</a> <li class="tocline3"><a href="about.html#q14" class="tocxref">1.3.5 Images and long descriptions</a> </ul> <li class="tocline2"><a href="about.html#q15" class="tocxref">1.4 Acknowledgments</a> <li class="tocline2"><a href="about.html#copyright" class="tocxref">1.5 Copyright Notice</a> </ul></div><h2><a name="q1">1.1 Reading the specification</a></h2><P>This specification has been written with two types of readers inmind: CSS authors and CSS implementors. We hope the specification willprovide authors with the tools they need to write efficient,attractive, and accessible documents, without overexposing them toCSS's implementation details. Implementors, however, should find allthey need to build <a href="conform.html#conformance">conforming useragents</a>.The specification begins with a general presentation of CSS andbecomes more and more technical and specific towards the end. Forquick access to information, a general table of contents,specific tables of contents at the beginning of each section,and an index provide easy navigation, in both the electronicand printed versions.<P>The specification has been written with two modes of presentationin mind: electronic and printed. Although the two presentations willno doubt be similar, readers will find some differences. For example,links will not work in the printed version (obviously), and pagenumbers will not appear in the electronic version. In case of adiscrepancy, the electronic version is considered the authoritativeversion of the document.<h2><a name="q2">1.2 How the specification is organized</a></h2><P>The specification is organized into the following sections:<dl><dt><Strong>Section 2: An introduction to CSS2</strong><dd>The introduction includes a brief tutorial on CSS2 anda discussion of design principles behind CSS2. <dt><strong>Sections 3 - 20: CSS2 reference manual.</strong><dd>The bulk of the reference manual consists of the CSS2 languagereference. This reference defines what may go into a CSS2 style sheet(syntax, properties, property values) and how user agents mustinterpret these style sheets in order to claim <ahref="conform.html#conformance">conformance</a>.<dt><strong>Appendixes:</strong><dd>Appendixes contain information about <a href="sample.html">asample style sheet for HTML 4.0</a>, <a href="changes.html">changesfrom CSS1 </a>, <a href="notes.html">implementation andperformance notes</a>, <a href="grammar.html">the grammar of CSS2</a>, a list of normative and informative <a href="refs.html">references</a>,and three indexes: one for<a href="propidx.html">properties</a>, one for<a href="descidx.html">descriptors</a>, and one<a href="indexlist.html">general index</a>.</dl><H2><a name="q3">1.3 Conventions</a></H2><H3><a name="q4">1.3.1 </a><a href="conform.html#doclanguage">Document language</a> elementsand attributes</H3><ul><li>CSS property, descriptor, and pseudo-class names are delimitedby single quotes.<li>CSS values are delimited by single quotes.<li>Document language element names are in uppercase letters.<li>Document language attribute names are in lowercase letters and delimited by double quotes.</ul><H3>1.3.2 <a name="property-defs">CSS property definitions</a></H3><P>Each CSS property definition begins with a summary of keyinformation that resembles the following:</p><div class="propdef"><dl><dt><a name="propdef-property-name" class="propdef-title"><strong>'property-name'</strong></a><dd><table class="propinfo" cellspacing=0 cellpadding=0><tr valign=baseline><td><em>Value:</em> <td>legal values & syntax<tr valign=baseline><td><em>Initial:</em> <td>initial value<tr valign=baseline><td><em>Applies to:</em> <td>elements this property applies to<tr valign=baseline><td><em>Inherited:</em> <td>whether the property is inherited<tr valign=baseline><td><em>Percentages:</em> <td>how percentage values are interpreted<tr valign=baseline><td><em>Media:</em> <td>which media groups the property applies to</table></dl></div><h4><a name="q6"> Value</a></h4><P>This part specifies the set of valid values for the property. Valuetypes may be designated in several ways:<ol><li> <a name="syndata.html#keywords">keyword</a> values (e.g., auto,disc, etc.)<li> basic data types, which appear between "<" and ">" (e.g.,<length>, <percentage>, etc.). In the electronic versionof the document, each instance of a basic data type links to itsdefinition.<li> types that have the same range of values as a propertybearing the same name (e.g., <'border-width'><'background-attachment'>, etc.). In this case, the typename is the property name (complete with quotes) between "<" and">" (e.g., <'border-width'>). In the electronic version ofthe document, each instance of this type of non-terminal links to thecorresponding property definition.<li> non-terminals that do not share the same name as a property. In thiscase, the non-terminal name appears between "<" and ">", as in<border-width>. Notice the distinction between<border-width> and <'border-width'>; the latter is definedin terms of the former. The definition of a non-terminal is locatednear its first appearance in the specification. In the electronicversion of the document, each instance of this type of value links tothe corresponding value definition.</ol><P>Other words in these definitions are keywords that must appearliterally, without quotes (e.g., red). The slash (/) and the comma (,)must also appear literally.<P>Values may be arranged as follows:</p><ul><li>Several juxtaposed words mean that all of them must occur, in thegiven order.<li>A bar (|) separates two or more alternatives: exactly one of them must occur.<li>A double bar (||) separatestwo or more options: one or more of them must occur, in any order.<li>Brackets ([ ]) are for grouping. </ul><P>Juxtaposition is stronger than the double bar, and the double baris stronger than the bar. Thus, the following lines are equivalent:<PRE> a b | c || d e [ a b ] | [ c || [ d e ]]</PRE><P> Every type, keyword, or bracketed group may be followed by one ofthe following modifiers:</p> <UL> <LI> An asterisk (*) indicates that the preceding type, word, or group occurs zero or more times. <LI> A plus (+) indicates that the preceding type, word, or group occurs one or more times. <LI> A question mark (?) indicates that the preceding type, word, or group is optional. <LI> A pair of numbers in curly braces ({A,B}) indicates that the preceding type, word, or group occurs at least A and at most B times. </UL><P>The following examples illustrate different value types:<BLOCKQUOTE> <EM>Value:</EM> N | NW | NE<BR> <EM>Value:</EM> [ <length> | thick | thin ]{1,4}<BR> <EM>Value:</EM> [<family-name> , ]* <family-name><BR> <EM>Value:</EM> <uri>? <color> [ / <color> ]?<BR> <EM>Value:</EM> <uri> || <color><BR></BLOCKQUOTE><h4><a name="q7"> Initial</a></h4><P>This part specifies the property's initial value. If the propertyis inherited, this is the value that is given to the root element ofthe <a href="conform.html#doctree">document tree</a>. Please consultthe section on <a href="cascade.html">the cascade</a> for informationabout the interaction between style sheet-specified, inherited, andinitial values.<h4><a name="q8"> Applies to</a></h4><p>This part lists the elements to which the property applies. Allelements are considered to have all properties, but some propertieshave no rendering effect on some types of elements. For example, <a href="text.html#propdef-white-space" class="noxref"><spanclass="propinst-white-space">'white-space'</span></a> only affectsblock-level elements.<h4><a name="q9"> Inherited</a></h4><p>This part indicates whether the value of the property is inheritedfrom an ancestor element. Please consult the section on <ahref="cascade.html">the cascade</a> for information about theinteraction between style sheet-specified, inherited, and initialvalues.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -