Skip to content

Instantly share code, notes, and snippets.

@csssecrets
Created January 4, 2015 21:58
Show Gist options
  • Save csssecrets/0f19ac5d28d0aa7b6c60 to your computer and use it in GitHub Desktop.
Save csssecrets/0f19ac5d28d0aa7b6c60 to your computer and use it in GitHub Desktop.
Flexible background positioning
/**
* Flexible background positioning
* via extended background-position
*/
div {
background: url(http://csssecrets.io/images/code-pirate.svg)
no-repeat bottom right #58a;
background-origin: content-box;
/* Styling */
max-width: 10em;
min-height: 5em;
padding: 10px;
color: white;
font: 100%/1 sans-serif;
}
<div>Code Pirate</div>
// alert('Hello world!');
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment