Home / CSS / Attribute selectors – CSS [attribute*=value] Selector | Select Element By Specific attribute value

Attribute selectors – CSS [attribute*=value] Selector | Select Element By Specific attribute value

Use the following code –

[class^="top"] {
background: yellow;
}

or

[class*="me"] {
background: yellow;
}

It doesn’t have to be the whole value.

Hits: 6

Leave a Reply