Last active
December 12, 2015 12:19
-
-
Save juanpasolano/4770804 to your computer and use it in GitHub Desktop.
CSS: attribute selectors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
li[class~='red'] {} /*Selects all li that have the class red and other classes*/ | |
li[class|='red'] {} /*Selects li that have hyphen separeted values, ie: 'red-button', 'red-external'*/ | |
li[class*='red'] {} /*selects all li that have the a class tat has red in it ie: 'ared', 'redid', 'xxxxxred'*/ | |
li[class^='red'] {} /*Selects all li which class starts with 'red', ie: 'redid', 'redxxx'*/ | |
li[class$='red'] {} /*selects li which class ends with value 'red', ie: 'xxxred', 'ared'*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment