Skip to content

Instantly share code, notes, and snippets.

@magemore
Created April 25, 2012 04:56
Show Gist options
  • Save magemore/2486547 to your computer and use it in GitHub Desktop.
Save magemore/2486547 to your computer and use it in GitHub Desktop.
Resize your background image
#resize-image {
/* Just imagine that the image_1.png is 200x400px */
background:url(image_1.png) top left no-repeat;
-moz-background-size: 100px 200px;
-o-background-size: 100px 200px;
-webkit-background-size: 100px 200px;
}
@magemore
Copy link
Author

Lets you do just what the title says. Simply change the size values and bam: resized background image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment