2.1.2. Element Selector
If the selection is not unexpected, it is an HTML element, but everything is not absolute. For example, when the style contained in a CSS file is used for an XML file, the selector may look like this:
QUOTE {color: gray;}
BIB {color: red;}
BOOKTITLE {color: purple;}
MYElement {color: red;}
That is to say, the elements in the document are the most basic selector. In XML, the selector can be any element, as long as it is any element name in the new markup language of XML. On the other hand, if the style is applied for the HTML document, the selector is generally one of the HTML elements. Such as P, H3, em, A, or even HTML itself. For example:
html {color: black;}
h1 {color: gray;}
h2 {color: silver;}
The results of the style sheet are displayed in Figure 2-2.
Figure 2-2 simple styles in simple documents
Once you apply a style (global) to an element, you can shift the style from one element to another [1]. For example, if you want to apply the text in a paragraph rather than the H1 element, the figure 2-2 will be gray. Simple. Just change the selector H1 to P:
html {color: black;}
p {color: gray;}
h2 {color: silver;}
The result is shown in Figure 2-3.
Figure 2-3 The style will change as the element changes
Note 1: shift here should be the author's puntion. It's just like driving shift position.
Http://bbs.blueidea.com/thread-2789105-1-1.html