Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save yellowberri-snippets/8227444 to your computer and use it in GitHub Desktop.
Save yellowberri-snippets/8227444 to your computer and use it in GitHub Desktop.
CSS: Zoom and Show Image Background
.wrapper {
background-image: url('image.jpg');
background-repeat: no-repeat;
background-position:center center;
overflow:hidden;
img {
display:block;
opacity:1;
@include transform(scale(1,1));
-webkit-transform: translate3d(0,0,0);
@include transition(opacity 200ms linear, transform 200ms linear);
&:hover {
opacity:.5;
@include transform(scale(1.1,1.1));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment