Created
June 4, 2015 20:36
-
-
Save steve54b/22f6dca5b28b906b7b52 to your computer and use it in GitHub Desktop.
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
1) Pseudo classes are combined with selectors to more specifically target | |
an element that may otherwise be difficult to distinguish from other | |
elements of the same type. e.g., if you have | |
<p>yakety-yak</p> | |
<p>don't talk back</p> | |
and you want to target only the "don't talk back", you can select it with: | |
p:nth-of-type(2) | |
2) Pseudo-elements are combined with selectors to apply styling to a | |
specified part of a selected element. | |
e.g., if you have | |
<p class="like-fer-shur">huh what? | |
</p> | |
and you wnat just the 'h' in 'huh' to be blue, you can select it with: | |
.like-fer-shur::first-letter { | |
color:blue; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment