Created
July 23, 2014 02:53
-
-
Save anonymous/e570b4ce50c6f45b79c6 to your computer and use it in GitHub Desktop.
Untitled
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
.img-wrapper { | |
width: 300px; | |
height: 150px; | |
overflow: hidden; | |
position: relative; | |
float: left; | |
margin: 20px; | |
} | |
img { | |
position: absolute; | |
min-width: 100%; | |
min-height: 100%; | |
transform: translate(-50%,-50%); | |
top: 50%; | |
left: 50%; | |
} |
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
<div class="img-wrapper"><img src="http://placekitten.com/200/300" /></div> | |
<div class="img-wrapper"><img src="http://placekitten.com/500/600" /></div> | |
<div class="img-wrapper"><img src="http://placekitten.com/300/150" /></div> |
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
// alert('Hello world!'); |
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
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment