HTML
<main class="cf w-100">
<div class="fl w-50 w-third-m w-25-ns">
<div class="aspect-ratio aspect-ratio--9x16">
<div style="background-image:url(http://mrmrs.github.io/images/0006.jpg);"
class="bg-center cover aspect-ratio--object"></div>
</div>
</div>
<div class="fl w-50 w-third-m w-25-ns">
<div class="aspect-ratio aspect-ratio--9x16">
<div style="background-image:url(http://mrmrs.github.io/images/0002.jpg);"
class="bg-center cover aspect-ratio--object"></div>
</div>
</div>
<div class="fl w-50 w-third-m w-25-ns">
<div class="aspect-ratio aspect-ratio--9x16">
<div style="background-image:url(http://mrmrs.github.io/images/0003.jpg);"
class="bg-center cover aspect-ratio--object"></div>
</div>
</div>
<div class="fl w-50 w-third-m w-25-ns">
<div class="aspect-ratio aspect-ratio--9x16">
<div style="background-image:url(http://mrmrs.github.io/images/0004.jpg);"
class="bg-center cover aspect-ratio--object"></div>
</div>
</div>
<div class="fl w-50 w-third-m w-25-ns">
<div class="aspect-ratio aspect-ratio--9x16">
<div style="background-image:url(http://mrmrs.github.io/images/0007.jpg);"
class="bg-center cover aspect-ratio--object"></div>
</div>
</div>
<div class="fl w-50 w-third-m w-25-ns">
<div class="aspect-ratio aspect-ratio--9x16">
<div style="background-image:url(http://mrmrs.github.io/images/0008.jpg);"
class="bg-center cover aspect-ratio--object"></div>
</div>
</div>
<div class="fl w-50 w-third-m w-25-ns">
<div class="aspect-ratio aspect-ratio--9x16">
<div style="background-image:url(http://mrmrs.github.io/images/0009.jpg);"
class="bg-center cover aspect-ratio--object"></div>
</div>
</div>
<div class="fl w-50 w-third-m w-25-ns">
<div class="aspect-ratio aspect-ratio--9x16">
<div style="background-image:url(http://mrmrs.github.io/images/0010.jpg);"
class="bg-center cover aspect-ratio--object"></div>
</div>
</div>
<div class="fl w-50 w-third-m w-25-ns">
<div class="aspect-ratio aspect-ratio--9x16">
<div style="background-image:url(http://mrmrs.github.io/images/0011.jpg);"
class="bg-center cover aspect-ratio--object"></div>
</div>
</div>
<div class="fl w-50 w-third-m w-25-ns">
<div class="aspect-ratio aspect-ratio--9x16">
<div style="background-image:url(http://mrmrs.github.io/images/0012.jpg);"
class="bg-center cover aspect-ratio--object"></div>
</div>
</div>
<div class="fl w-50 w-third-m w-25-ns">
<div class="aspect-ratio aspect-ratio--9x16">
<div style="background-image:url(http://mrmrs.github.io/images/0013.jpg);"
class="bg-center cover aspect-ratio--object"></div>
</div>
</div>
<div class="fl w-50 w-third-m w-25-ns">
<div class="aspect-ratio aspect-ratio--9x16">
<div style="background-image:url(http://mrmrs.github.io/images/0014.jpg);"
class="bg-center cover aspect-ratio--object"></div>
</div>
</div>
<div class="fl w-50 w-third-m w-25-ns">
<div class="aspect-ratio aspect-ratio--9x16">
<div style="background-image:url(http://mrmrs.github.io/images/0015.jpg);"
class="bg-center cover aspect-ratio--object"></div>
</div>
</div>
<div class="fl w-50 w-third-m w-25-ns">
<div class="aspect-ratio aspect-ratio--9x16">
<div style="background-image:url(http://mrmrs.github.io/images/0016.jpg);"
class="bg-center cover aspect-ratio--object"></div>
</div>
</div>
<div class="fl w-50 w-third-m w-25-ns">
<div class="aspect-ratio aspect-ratio--9x16">
<div style="background-image:url(http://mrmrs.github.io/images/0017.jpg);"
class="bg-center cover aspect-ratio--object"></div>
</div>
</div>
<div class="fl w-50 w-third-m w-25-ns">
<div class="aspect-ratio aspect-ratio--9x16">
<div style="background-image:url(http://mrmrs.github.io/images/0018.jpg);"
class="bg-center cover aspect-ratio--object"></div>
</div>
</div>
<div class="fl w-50 w-third-m w-25-ns">
<div class="aspect-ratio aspect-ratio--9x16">
<div style="background-image:url(http://mrmrs.github.io/images/0019.jpg);"
class="bg-center cover aspect-ratio--object"></div>
</div>
</div>
<div class="fl w-50 w-third-m w-25-ns">
<div class="aspect-ratio aspect-ratio--9x16">
<div style="background-image:url(http://mrmrs.github.io/images/0020.jpg);"
class="bg-center cover aspect-ratio--object"></div>
</div>
</div>
<div class="fl w-50 w-third-m w-25-ns">
<div class="aspect-ratio aspect-ratio--9x16">
<div style="background-image:url(http://mrmrs.github.io/images/0021.jpg);"
class="bg-center cover aspect-ratio--object"></div>
</div>
</div>
<div class="fl w-50 w-third-m w-25-ns">
<div class="aspect-ratio aspect-ratio--9x16">
<div style="background-image:url(http://mrmrs.github.io/images/0022.jpg);"
class="bg-center cover aspect-ratio--object"></div>
</div>
</div>
</main>
css
.aspect-ratio {
height: 0;
position: relative;
}
.aspect-ratio--9x16 {
padding-bottom: 177.77%;
}
.aspect-ratio--object {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 100;
}
.cover {
background-size: cover !important;
}
.bg-center {
background-repeat: no-repeat;
background-position: center center;
}
.cf:before, .cf:after {
content: " ";
display: table;
}
.cf:after {
clear: both;
}
.cf {
*zoom: 1;
}
.fl {
float: left;
_display: inline;
}
.w-50 {
width: 50%;
}
.w-100 {
width: 100%;
}
@media screen and (min-width: 30em) {
.w-25-ns {
width: 25%;
}
}
@media screen and (min-width: 30em) and (max-width: 60em) {
.w-third-m {
width: calc(100% / 3);
}
}