Skip to content

Instantly share code, notes, and snippets.

@Ricardo-Diaz
Created October 25, 2012 23:02
Show Gist options
  • Save Ricardo-Diaz/3956015 to your computer and use it in GitHub Desktop.
Save Ricardo-Diaz/3956015 to your computer and use it in GitHub Desktop.
CSS: Resize Bg Image
Resize your background image
Lets you do just what the title says. Simply change the size values and bam: resized 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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment