Skip to content

Instantly share code, notes, and snippets.

@henvic
Created August 26, 2014 20:12
Show Gist options
  • Save henvic/f87d952aeb96209093f7 to your computer and use it in GitHub Desktop.
Save henvic/f87d952aeb96209093f7 to your computer and use it in GitHub Desktop.
<ul class="posts-thumbnail-view results-thumbnail clearfix">
<li>
<a href="/henvic/1340">
<div class="img-place">
<img src="https://d8o390tnhj670.cloudfront.net//unsafe/400x300/73f391c8253d4c969aedb68c928b663c.jpg" alt="picture">
</div>
<p class="post-listing">
<em>Volvo</em> 460 5.7
<br>
<span class="post-listing-price">R$ 53.400,00</span> <span class="muted">#1340</span><br>
<span class="post-listing-details">
2013
| 82800 km
</span><br>
</p>
</a>
</li>
<li>
<a href="/henvic/1146">
<div class="img-place">
<img src="https://d8o390tnhj670.cloudfront.net//unsafe/400x300/00d030e9618041199d7b0f017813c7c1.jpg" alt="picture">
</div>
<p class="post-listing">
<em>Volvo</em> 960 3.5
<br>
<span class="post-listing-price">R$ 42.100,00</span> <span class="muted">#1146</span><br>
<span class="post-listing-details">
2000
| 26550 km
</span><br>
</p>
</a>
</li>
<li>
<a href="/henvic/83">
<div class="img-place">
<img src="https://d8o390tnhj670.cloudfront.net//unsafe/194x42:738x450/400x300/0ee15e8016ba4ec08b8de2908e6834d9.jpg" alt="picture">
</div>
<p class="post-listing">
<em>Volvo</em> V40 4.7 Completão
<br>
<span class="post-listing-price">R$ 130.000,00</span> <span class="muted">#83</span><br>
<span class="post-listing-details">
2013
| 20000 km
</span><br>
<span class="label label-info">Automático</span>
</p>
</a>
</li>
</ul>
.posts-thumbnail-view {
display: block;
margin: 0;
list-style-type: none;
}
.posts-thumbnail-view li {
position: relative;
display: block;
float: left;
width: 220px;
height: 250px;
overflow: hidden;
line-height: 156%;
border-top: 1px solid #ccc;
border-left: 1px solid #ccc;
box-sizing: border-box;
}
.posts-thumbnail-view li a {
color: #333;
display: block;
width: 100%;
height: 100%;
box-sizing: border-box;
padding: 10px;
}
@media (min-width: 481px) and (max-width: 659px) {
.posts-thumbnail-view li:nth-child(-n+2) {
border-top: none;
}
.posts-thumbnail-view li:nth-child(2n + 1) {
border-left: none;
}
}
@media (min-width: 660px) and (max-width: 767px) {
.posts-thumbnail-view li:nth-child(-n+3) {
border-top: none;
}
.posts-thumbnail-view li:nth-child(3n + 1) {
border-left: none;
}
}
@media (min-width: 768px) and (max-width: 979px) {
.posts-thumbnail-view li:nth-child(-n+2) {
border-top: none;
}
.posts-thumbnail-view li:nth-child(2n + 1) {
border-left: none;
}
}
@media (min-width: 980px) and (max-width: 1199px) {
.posts-thumbnail-view li:nth-child(-n+3) {
border-top: none;
}
.posts-thumbnail-view li:nth-child(3n + 1) {
border-left: none;
}
}
@media (min-width: 1200px) {
.posts-thumbnail-view li:nth-child(-n+4) {
border-top: none;
}
.posts-thumbnail-view li:nth-child(4n + 1) {
border-left: none;
}
}
.posts-thumbnail-view li,
.posts-thumbnail-view li .label {
font-size: 85%;
}
.posts-thumbnail-view li .label {
line-height: 15px;
}
.posts-thumbnail-view li p {
padding: 3px;
}
.posts-thumbnail-view li .img-place {
display: block;
width: 200px;
height: 150px;
text-align: center;
}
.posts-thumbnail-view li img {
height: 100%;
-moz-background-clip: padding;
-webkit-background-clip: padding-box;
background-clip: padding-box;
}
.posts-thumbnail-view li a:active,
.posts-thumbnail-view li a:hover {
text-decoration: none;
}
.posts-thumbnail-view li .img-place .actions {
position: absolute;
width: 200px;
color: #fff;
box-sizing: border-box;
font-size: 90%;
cursor: pointer;
margin-top: -18px;
opacity: 0;
}
.posts-thumbnail-view li .img-place .actions .action {
float: left;
width: 48%;
margin-top: -1%;
margin-left: 1%;
margin-right: 1%;
background: rgba(167, 13, 28, 0.8);
}
.posts-thumbnail-view li .img-place .actions .action:hover {
background: #333;
-webkit-transition: all 1s ease-out;
-moz-transition: all 1s ease-out;
transition: all 1s ease-out;
}
@media (max-width: 480px) {
.posts-thumbnail-view li {
border-left: none;
width: 100%;
height: 305px;
}
.posts-thumbnail-view li .img-place {
height: 215px;
}
.posts-thumbnail-view li .img-place,
.posts-thumbnail-view li p {
width: 300px;
margin: 0 auto;
}
.posts-thumbnail-view li .img-place .actions {
margin-left: 5px;
width: 250px;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment