Css Data Attribute Selectors Code Example


Example: css data attribute selector


[data-value] {
/* Attribute exists */
}

[data-value="foo"] {
/* Attribute has this exact value */
}

[data-value*="foo"] {
/* Attribute value contains this value somewhere in it */
}

[data-value~="foo"] {
/* Attribute has this value in a space-separated list somewhere */
}

[data-value^="foo"] {
/* Attribute value starts with this */
}

[data-value|="foo"] {
/* Attribute value starts with this in a dash-separated list */
}

[data-value$="foo"] {
/* Attribute value ends with this */
}

Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable