Added a CSS syntax and Example

This commit is contained in:
Pixelposh
2018-10-19 15:55:57 +02:00
committed by Kristofer Koishigawa
parent e659e5ecf5
commit f5cd5cd715

View File

@ -5,6 +5,14 @@ title: Star
Star CSS attribute selector or * is used for selecting attributes that contain specific value.
### CSS Syntax
```css
attribute *= value {
css declarations;
}
```
#### Example
If you want to search all anchor links that contain "code" anywhere in the URL value and make them yellow, you can do it like this:
@ -15,3 +23,11 @@ a[href*="code"] {
}
```
Set a background color on all `<div>` elements that have a class attribute value containing "backing":
```css
div[class*="backing"] {
background: #ffff00;
}
```