Skip to content

Instantly share code, notes, and snippets.

@LeaVerou
Created January 26, 2012 14:35
Show Gist options
  • Save LeaVerou/1683052 to your computer and use it in GitHub Desktop.
Save LeaVerou/1683052 to your computer and use it in GitHub Desktop.
Learning CSS3
/**
* Learning CSS3
* background-size, background-origin, outline
*/
html {
min-height:100%;
background: url('http://leaverou.github.com/CSSS/img/rainbow-wood.jpg') bottom;
background-size: cover;
}
section {
max-width: 20em;
padding: 3em;
margin: 4em auto;
border: 1px dashed #f06;
outline: 20px solid rgba(0,0,0,.8);
background: url(http://lea.verou.me/logo.svg) no-repeat bottom right;
background-color: black;
background-color: rgba(0,0,0,.8);
background-origin: content-box;
background-size: 150px;
color: white;
font: bold 100%/1.5 sans-serif;
text-shadow: 0 -.1em .2em black;
}
h1 { margin-top: 0 }
<section>
<h1>Learning CSS3</h1>
<p>This is just some example content. Don’t even bother reading it, you will just waste your time.
Why do you keep reading? Do I have to use Lorem Ipsum to stop you from that?
Ok, here goes: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Still reading? Oh gosh, you’re impossible. I’ll stop here to save you from yourself.
</section>
{"view":"split-vertical","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment