Skip to content

Instantly share code, notes, and snippets.

@zhuangya
Created February 21, 2014 06:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zhuangya/9129663 to your computer and use it in GitHub Desktop.
Save zhuangya/9129663 to your computer and use it in GitHub Desktop.
<ul class="clean-list">
<li class="thumbnail">
<img src="http://placehold.it/100x100">
</li>
<li class="thumbnail">
<img src="http://placehold.it/200x100">
</li>
<li class="thumbnail">
<img src="http://placehold.it/100x200">
</li>
<li class="thumbnail">
<img src="http://placehold.it/100x100">
</li>
<li class="thumbnail">
<img src="http://placehold.it/100x100">
</li>
<li class="thumbnail">
<img src="http://placehold.it/100x100">
</li>
<li class="thumbnail">
<img src="http://placehold.it/100x100">
</li>
</ul>
<style>
.clean-list {
list-style: none;
list-style-type: none;
margin: 0;
padding: 0;
outline: 1px solid blue;
}
.thumbnail {
display: inline-block;
margin: 45px;
width: 100px;
height: 100px;
text-align: center;
}
.thumbnail img:before {
height: 100%;
content: '\0020';
display: inline-block;
vertical-align: middle;
}
.thumbnail img {
max-width: 100%;
max-height: 100%;
vertical-align: middle;
display: inline-block;
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment