Last active
August 29, 2015 14:06
-
-
Save thure/8f55abc5da46b025de5e to your computer and use it in GitHub Desktop.
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
<!doctype html> | |
<html> | |
<head> | |
<style> | |
body { | |
/* put the URL of the image you want to use in this rule: */ | |
background-image: url('http://imgs.xkcd.com/comics/loop.png'); | |
/* put the color you want to use for the negative space in this rule: */ | |
background-color: #ccc; | |
/* no need to change anything else */ | |
} | |
html, body { | |
height: 100%; | |
padding: 0; | |
margin: 0; | |
} | |
body { | |
background-position: top center; | |
background-size: auto; | |
background-repeat: no-repeat; | |
} | |
</style> | |
</head> | |
<body> | |
</body> | |
</html> |
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
<!doctype html> | |
<html> | |
<head> | |
<style> | |
body { | |
/* put the color you want to use for the negative space in this rule: */ | |
background-color: #ccc; | |
} | |
html, body { | |
/* no need to change this rule */ | |
height: 100%; | |
overflow: auto; | |
padding: 0; | |
margin: 0; | |
} | |
img { | |
/* no need to change this rule either */ | |
display: block; | |
margin: 0 auto; | |
} | |
</style> | |
</head> | |
<body> | |
<!-- put the URL of the image you want to use in this rule: --> | |
<img src='http://imgs.xkcd.com/comics/loop.png'/> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment