CSS3: last-of-type selector
CSS selectors complete reference manual
Examples
Specifies the background color of the last p element of its parent:
p: last-of-type
{
background: # ff0000;
}
{
background: # ff0000;
}
try it"
Definition and Usage
: Last-of-type selector matches the parent element is a specific type of the last child element.
Tip: and: nth-last-of-type (1) is a meaning.
Browser Support
Figures in the table represent the first browser to support the version number of the property.
选择器 | |||||
---|---|---|---|---|---|
:last-of-type | 4.0 | 9.0 | 3.5 | 3.2 | 9.6 |