CSS3: target selector
CSS selectors complete reference manual
Examples
Highlight active HTML anchor:
:target
{
border: 2px solid #D4D4D4;
background-color: #e5eecc;
}
{
border: 2px solid #D4D4D4;
background-color: #e5eecc;
}
try it"
Definition and Usage
# Anchor name is the URL link in a document to an element. Element is linked to the target element.
: Target selector can be used to style the currently active target element.
Browser Support
Figures in the table represent the first browser to support the version number of the property.
选择器 | |||||
---|---|---|---|---|---|
:target | 4.0 | 9.0 | 3.5 | 3.2 | 9.6 |