CSS3: only-of-type selector
CSS selectors complete reference manual
Examples
Match belongs to the background color of the same type in the p elements only sibling elements:
p: only-of-type
{
background: # ff0000;
}
{
background: # ff0000;
}
try it"
Definition and Usage
: Only-of-type selector matches only belong to the same type of siblings.
Browser Support
Figures in the table represent the first browser to support the version number of the property.
选择器 | |||||
---|---|---|---|---|---|
:only-of-type | 4.0 | 9.0 | 3.5 | 3.2 | 9.6 |