-
-
Save kennyadsl/b84da148a5e613a2c9b3 to your computer and use it in GitHub Desktop.
Flexible background positioning
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
/** | |
* Flexible background positioning | |
* via extended background-position | |
*/ | |
div { | |
background: url(http://csssecrets.io/images/code-pirate.svg) | |
no-repeat #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; | |
} |
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
<div>Code Pirate</div> |
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
// alert('Hello world!'); |
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
{"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