Skip to content

Instantly share code, notes, and snippets.

@christiannaths
Created October 5, 2015 21:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christiannaths/de160c3482d73ee569f3 to your computer and use it in GitHub Desktop.
Save christiannaths/de160c3482d73ee569f3 to your computer and use it in GitHub Desktop.
very basic css cheat sheet
/* 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