Created
September 14, 2017 16:43
-
-
Save cyancey76/01c33ceefb06212e6aceb1369bc48cad to your computer and use it in GitHub Desktop.
CSS 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
* // All | |
#Z // ID | |
.Z // Class | |
X Y // Descendant | |
X // Element | |
X:link // Pseudo-class | |
X + Y // Adjacent Y sibling after X | |
X > Y // Direct child | |
X ~ Y // All Y siblings after X | |
X[attribute] // Attribute selector | |
X[attribute="value"] // Attribute equals value | |
X[attribute*="value"] // Attribute contains value | |
X[attribute^="value"] // Attribute begins with value | |
X[attribute$="value"] // Attribute ends with value | |
X[data-attribute="value"] // Has data-attribute of value | |
X[data-attribute~="value"] // Value in space separated data-attribute list | |
X:checked // Element that has been checked | |
X:before, X:after // Before and after pseudo-elements | |
X:not(selector) // All elements that are not selector |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment