Pseudo-classes add special effects to selectors.
Pseudo-classes add special effects to selectors.
Pseudo-class | Description | CSS Example |
---|---|---|
active | Applies to an element when it is in the process of being activated, for example, when the user holds the pointer down over it. |
|
first-child | Applies to an element that is the first child of some other element, for example, the first p that is a child of div. The same as :nth-child(1). |
|
focus | Applies to an element when it has a keyboard focus, for example, an xforms:input element when the user is entering data. |
|
hover | Applies to an element when a mouse pointer is hovering over the element, for example, an a element when the user holds the pointer over it but does not activate the link. |
|
invalid | Specifies all style changes that are applied to an XForms element when its value fails validation. |
|
in-range | Applies to an XForms element that has a data range defined when the entered data are within that range. |
|
last-child | Represents an element that is the last child of some other element, for example, a p element that is the last child of its parent. The same as :nth-last-child(1). Note:
Not supported in XDIME 1. |
|
link | Applies to links, for example, an a element that is a link. |
|
nth-child() | Applies to elements on the basis of their positions within a parent element’s list of child elements. It requires an argument which can be a keyword 'odd' or 'even', a number, or a formula: an+b. In the latter case, for values of a and b greater than zero, it divides child elements into groups of a elements and selects the bth element of each group. The a and b values must be integers. The index of the first child of an element is 1. For example, authors can apply style rules to every other tr element in a table. |
|
nth-last-child() | Matches every element that is the nth child, regardless of type, of its parent, counting from the last child. It requires an argument which can be a keyword 'odd' or 'even', a number, or a formula. In the latter case, it represents an element that has an+b-1 siblings after it in the document tree, for any positive integer or zero value of n, and has a parent element. The a and b values must be integers. The index of the first child of an element is 1. For example, matches every p element that is the second child of its parent, counting from the last child. Note:
Not supported in XDIME 1. |
|
only-child | Represents an element that has a parent element and whose parent element has no other element children, for example, an li element that is the only child of its parent. The ame as :first-child:last-child. Note:
Not supported in XDIME 1. |
|
optional | Applies to optional XForms fields. |
|
out-of-range | Applies to an XForms element that has a data range specified when the entered data are outside that range. |
|
required | Applies to mandatory XForms fields. |
|
root | Applies to an element that is the root of the document. Note:
MCS applies styles after any DCI operations have been processed, and therefore this pseudo-class selector will not match the root element of a document that is included inside another one. Note:
By default, MCS does not apply styles to html elements. Refer to the topic entitled xdime2 for more information. |
|
valid | Specifies all style changes that are applied to an XForms element when its value passes validation. |
|
visited | Applies when a link has been previously visited, for example, a dfn element that is a visited link. |
|
mcs-busy | Defines a busy state of a Status Update widget. |
|
mcs-change(FROM, TO) | Represents an element whose state has changed from one state to another. This pseudo-class allows page authors to associate transition effects with the change of the state of an element. The states, FROM and TO, are represented as pseudo-classes. Please note that this pseudo-class can only be used with the effect related properties, specifically mcs-effect-style, mcs-effect-duration and mcs-frame-rate, and the following pseudo-classes: :mcs-displayed and :mcs-concealed. For example, the 'wipe(top)' effect can be associated with the appearance and disappearance of an element. |
|
mcs-concealed | The concealed state is the state that an element is in when it is not displayed, i.e. has display: none. |
|
mcs-disabled | Allows styling on the elements in the disable state, such as widget:next, widget:play, etc. For example, widget:next is disabled if the end of the gallery was reached. |
|
mcs-displayed | Represents an element which is being displayed. |
|
mcs-failed | Specifies a failed state of a Status Update widget. |
|
mcs-invalid | Specifies all style changes that are applied after validation has failed. |
|
mcs-normal | The normal state of a Status Update widget. |
|
mcs-suspended | The suspended state of a Status Update widget. |
|
mcs-unfolded | Controls the unfolded state. It is set for the label of a submenu. |
|