Created
October 5, 2015 21:02
-
-
Save christiannaths/de160c3482d73ee569f3 to your computer and use it in GitHub Desktop.
very basic css cheat sheet
This file contains 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
/* selector syntax */ | |
tag { ... } | |
.class { ... } | |
#id { ... } | |
nested selector { ... } | |
.multiple.class.selector { ... } | |
/* backgrounds */ | |
selector { | |
background-color: #fe4322; | |
background-image: url("..."); | |
background-position: left top; | |
background-repeat: no-repeat; | |
/* shorthand - all properties declared at once */ | |
background: #fe4322 url("...") left top no-repeat; | |
} | |
/* fonts */ | |
selector { | |
font-family: helvetica, arial, sans-serif; | |
font-size: 16px; | |
font-weight: bold; | |
font-style: italic; | |
/* shorthand - all properties declared at once */ | |
font: 16px bold italic helvetica, arial, sans-serif; | |
} | |
/* text */ | |
selector { | |
color: #34a68b; | |
text-align: center; | |
text-indent: 40px; | |
text-decoration: underline; | |
text-transform: uppercase; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment