Skip to content

Instantly share code, notes, and snippets.

@SBaof
Forked from csssecrets/dabblet.css
Created September 14, 2017 07:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SBaof/ee1224d8a1a75bd64b20a3e97fb26d17 to your computer and use it in GitHub Desktop.
Save SBaof/ee1224d8a1a75bd64b20a3e97fb26d17 to your computer and use it in GitHub Desktop.
Flexible background positioning
/**
* Flexible background positioning
* via calc()
*/
div {
background: url(http://csssecrets.io/images/code-pirate.svg)
no-repeat bottom right #58a;
background-position: calc(100% - 20px) calc(100% - 10px);
/* 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