Wildcard character
Syntax:
*
Note:
Select all types of single objects in the document directory tree (DOM.
If the wildcard character is not the only component of a single character, "*" can be omitted.
Currently, IE5.5 + does not support this selection character.
Example:
* [Lang = fr] {font-size: 14px; width: 120px ;}
*. Div {text-decoration: none ;}
Type selector
Syntax:
E1
Note:
The document language object type is used as the selector.
Example:
Td {font-size: 14px; width: 120px ;}
A {text-decoration: none ;}
Attribute selector
Syntax:
1. E1 [attr]
2. E1 [attr = value]
3. E1 [attr ~ = Value]
4. E1 [attr | = value]
Note:
1. Select E1 with the attr attribute
2. Select E1 with the attr attribute and the attribute value is equal to the value.
3. Select the word list with the attr attribute and the attribute value is separated by spaces. One of the words is equal to the value of E1. The value here cannot contain spaces
4. Select the word list with the attr attribute and the attribute value is separated by a hyphen. The E1
Currently, IE5.5 + does not support this selection character.
Example:
H [title] {color: blue ;}
/* All h objects with the title attribute */
Span [class = demo] {color: red ;}
Div [speed = "fast"] [dorun = "no"] {color: red ;}
A [rel ~ = "Copyright"] {color: black ;}
Include selector
Syntax:
E1 E2
Note:
Select all E2 contained by E1. That is, E1.contains (E2) = true.
Example:
Table td {font-size: 14px ;}
Div. sub a {font-size: 14px ;}
Sub-object selector
Syntax:
E1> E2
Note:
Select E2 for all E1 sub-objects.
Currently, IE5.5 + does not support this selection character.
Example:
Body> p {font-size: 14px ;}
/* The font size of all p objects as sub-objects of the body is 14px */
Div ul> li p {font-size: 14px ;}
ID selector
Syntax:
# SID
Note:
Take the ID of the object as the unique identifier in the document directory tree (DOM) as the selector.