<h1 class="page_title">CSS Image Grid with Hover</h1>
<div class="row">
<div class="container">
<div class="test_box box-01 col-xs-6 col-md-4">
<div class="inner">
<a href="#" class="test_click">
<div class="flex_this">
<h1 class="test_title">Title</h1>
<span class="test_link">Link</span>
</div>
</a>
</div>
</div>
<div class="test_box box-02 col-xs-6 col-md-4">
<div class="inner">
<a href="#" class="test_click">
<div class="flex_this">
<h1 class="test_title">Title</h1>
<span class="test_link">Link</span>
</div>
</a>
</div>
</div>
<div class="test_box box-03 col-xs-6 col-md-4">
<div class="inner">
<a href="#" class="test_click">
<div class="flex_this">
<h1 class="test_title">Title</h1>
<span class="test_link">Link</span>
</div>
</a>
</div>
</div>
<div class="test_box box-04 col-xs-6 col-md-4">
<div class="inner">
<a href="#" class="test_click">
<div class="flex_this">
<h1 class="test_title">Title</h1>
<span class="test_link">Link</span>
</div>
</a>
</div>
</div>
<div class="test_box box-05 col-xs-6 col-md-4">
<div class="inner">
<a href="#" class="test_click">
<div class="flex_this">
<h1 class="test_title">Title</h1>
<span class="test_link">Link</span>
</div>
</a>
</div>
</div>
<div class="test_box box-06 col-xs-6 col-md-4">
<div class="inner">
<a href="#" class="test_click">
<div class="flex_this">
<h1 class="test_title">Title</h1>
<span class="test_link">Link</span>
</div>
</a>
</div>
</div>
</div>
</div>
/*
Using Bootstrap
*/
@import url(https://fonts.googleapis.com/css?family=Raleway:300,700);
body {
background: #048;
background: -webkit-linear-gradient(left top, #027, #48a);
background: -moz-linear-gradient(bottom right, #027, #48a);
background: linear-gradient(to bottom right, #027, #48a);
background-attachment: fixed;
color: #fff;
font-family: 'Raleway', Helvetica, Arial, sans-serif;
font-size: 18px;
font-weight: 300;
line-height: 140%;
margin: 0;
height: 100%;
padding: 0;
text-align: center;
width: 100%;
}
.page_title {
font-weight: 300;
line-height: 120%;
margin: 20px 0;
text-shadow: 0 1px 5px rgba(0,0,0,.8);
text-transform: uppercase;
}
/* PEN STYLES ========== */
.row {
margin: 0;
}
.container {
}
.test_box {
padding: 0;
}
.test_box .inner {
background: #333;
display: block;
margin: 10px;
overflow: hidden;
}
.test_box .inner .test_click {
-webkit-align-content: center;
-ms-flex-line-pack: center;
align-content: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
background-color: rgba(0,0,0,.1);
color: #fff;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
flex-wrap: wrap;
height: 300px;
mix-blend-mode: normal;
text-align: center;
text-decoration: none;
-webkit-transition: all 300ms ease;
transition: all 300ms ease;
}
.test_box .inner .test_click:hover {
background-color: rgba(0,100,255,.5);
mix-blend-mode: hard-light;
}
.flex_this {
-webkit-align-content: center;
-ms-flex-line-pack: center;
align-content: center;
display: inherit;
flex-wrap: inherit;
height: auto;
margin: 0;
padding: 10px;
-webkit-transition: all 300ms ease;
transition: all 300ms ease;
width: 100%;
}
.test_box .inner .test_click:hover .flex_this {
margin-top: -5px;
}
.test_title {
display: block;
font-weight: 700;
margin: 0 0 20px;
width: 100%;
}
.test_link {
border: 2px solid #fff;
display: inline-block;
font-size: .8em;
font-weight: 700;
letter-spacing: .1em;
margin: 0 auto;
padding: 10px 30px;
text-transform: uppercase;
}
.box-01 .inner {
background-image: url('https://picsum.photos/1024/768?image=1033');
background-position: 50% 50%;
background-repeat: no-repeat;
background-size: cover;
}
.box-02 .inner {
background-image: url('https://picsum.photos/1024/768?image=967');
background-position: 50% 50%;
background-repeat: no-repeat;
background-size: cover;
}
.box-03 .inner {
background-image: url('https://picsum.photos/1024/768?image=924');
background-position: 50% 50%;
background-repeat: no-repeat;
background-size: cover;
}
.box-04 .inner {
background-image: url('https://picsum.photos/1024/768?image=1073');
background-position: 50% 50%;
background-repeat: no-repeat;
background-size: cover;
}
.box-05 .inner {
background-image: url('https://picsum.photos/1024/768?image=1032');
background-position: 50% 50%;
background-repeat: no-repeat;
background-size: cover;
}
.box-06 .inner {
background-image: url('https://picsum.photos/1024/768?image=1080');
background-position: 50% 50%;
background-repeat: no-repeat;
background-size: cover;
}