![]() ![]() Value is a white space-separated list of words, one of which is exactly Represents an element with the att attribute whose Match when the element's "att" attribute value is exactly "val". Thus, special formatting onlyĬSS 2.1 allows authors to specify rules that match elementsĥ.8.1 Matching attributes and attribute valuesĪttribute selectors may match in four ways: Match when the element sets the "att" attribute, whatever The following rule is similar to the one in the previous example,Įxcept that it adds a class selector. When several selectors share the same declarations, they may be Information applies to a subpart of each subject. To the last simple selector in a chain, in which case the style Subjects of a selector are always a subset of the elements matching Prepending a simple selector andĬombinator to a chain imposes additional matching constraints, so the The elements of the document tree that match a selector are calledĪ selector consisting of a single simple selector matches any element White space may appear between a combinator and the Simple selectors separated by combinators. Refers to a smaller part of a selector in CSS3 than in CSS 2.1. Note: the terminology used here in CSS 2.1 isĭifferent from what is used in CSS3. Selector matches if all of its components match. Selectors, ID selectors, or pseudo-classes, in any order. (In HTML, the sameĪ type selector or universal selector followed immediately "lang" attribute has a hyphen-separated list of valuesĭIV.warning Language specific. "foo" attribute value is a list of space-separated values, one of "foo" attribute value is exactly equal to "warning". "foo" attribute set (whatever the value).Į Matches any E element whose The :lang() pseudo-class E + F Matches any F element immediately preceded by (the document language specifies how language is determined). The dynamic pseudo-classes E:lang(c) Matches element of type E if it is in (human) language c TypeĮ F Matches any F element that is a descendant ofĮ > F Matches any F element that is a child ofĮ:first-child Matches element E when E is the firstĮ:visited Matches element E if E is the sourceĪnchor of a hyperlink of which the target is not yet visited (:link) The following table summarizes CSS 2.1 selector syntax: Pattern Meaning Described in sectionĮ Matches any E element (i.e., an element of type E). For example, in HTML,Įlement names are case-insensitive, but in XML they are Selectors depends on the document language. The case-sensitivity of document language element names in If all conditions in the pattern are trueįor a certain element, the selector matches the element. These patterns, called selectors, may range from simple element names In CSS, pattern matching rules determine which style rules apply to ![]() The CSS Working Group is also developing CSS level 2 revision 2 (CSS 2.2). Please, see "Cascading Style Sheets (CSS) - The Official Definition" in the latest CSS Snapshot for a list of specifications and the sections they replace. Note: Several sections of this specification have been updated by other specifications. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |