Selectors are a pattern used to select the elements which we want to style. A selector can contain one or more simple selectors separated by combinators. The CSS3 Selectors module introduces three new attribute selectors; they are grouped together under the heading Substring Matching Attribute Selectors.
These new selectors are as follows:
The first of these new selectors, which we will refer to as the "begins with" selector, allows the selection of elements where a specified attribute (for example, the href
attribute of a hyperlink) begins with a specified string (for example, http://
, https://
, or mailto:
).
In the same way, the additional two new selectors, which we will refer to as the "ends with" and "contains" selectors, allow the selection of elements where a specified attribute either ends with or contains a specified string respectively.
A CSS pseudo-class is just an additional keyword to selectors that tells a special state of the element to be selected. For example, :hover
will apply a style when the user hovers over the element specified by the selector. Pseudo-classes, along with pseudo-elements, apply a style to an element not only in relation to the content of the document tree, but also in relation to external factors like the history of the navigator, such as :visited
, and the status of its content, such as :checked
, on some form elements.
The new pseudo-classes are as follows:
3.129.249.194