CSS3 [attribute ^ = value] Selector
CSS selectors complete reference manual
Examples
Set the class attribute value to "test" the beginning of the background color of all div elements:
div [class ^ = "test"]
{
background: # ffff00;
}
{
background: # ffff00;
}
try it"
Definition and Usage
The[attribute ^ = value] selector matches the element attribute value with the specified value at the start of the element.
Browser Support
All major browsers support[attribute^ = value] selector.
Note: [attribute ^ = value] run in IE8, you must declare <DOCTYPE!>
More examples
Examples
Set the class attribute value to "test" the beginning of all the elements of the background color:
[class^="test"]
{
background:#ffff00;
}
{
background:#ffff00;
}
try it"