Created
January 2, 2014 21:40
-
-
Save yellowberri-snippets/8227444 to your computer and use it in GitHub Desktop.
CSS: Zoom and Show Image Background
This file contains hidden or 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
.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