Skip to content

Instantly share code, notes, and snippets.

Created September 5, 2013 03:00
Show Gist options
  • Save anonymous/6445552 to your computer and use it in GitHub Desktop.
Save anonymous/6445552 to your computer and use it in GitHub Desktop.
Untitled
.thumb {
position: relative;
width: 200px;
height: 200px;
overflow: hidden;
font-size:0;
white-space: nowrap;
}
.thumb-inner {
position: absolute;
top: -400px;
bottom: -400px;
}
.thumb-inner img{
vertical-align: middle;
}
.valign {
display: inline-block;
vertical-align: middle;
width: 0;
height: 100%;
overflow: hidden;
}
<div class="thumb">
<div class="thumb-inner">
<img src="http://dummyimage.com/200x500">
<i class="valign"></i>
</div>
</div>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"html"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment