Ajax Loader
×
HTML
<section class="super">
1
<section class="super">
2
  <div class="wrp">
3
    <img src="http://myth.mtdemo.wpengine.com/wp-content/uploads/sites/28/2015/05/misty-trees-1600x1067.jpg">
4
    <article>
5
      <date>march 14, 2015</date>
6
      <h2>Misty Trees</h2>
7
      <button>more</button>
8
    </article>
9
  </div>
10
</section>
11
 
12
<section>
13
  <div class="wrp">
14
    <img src="http://myth.mtdemo.wpengine.com/wp-content/uploads/sites/28/2015/05/mountain-range-1600x1063.jpg">
15
    <article>
16
      <date>march 14, 2015</date>
17
      <h2>Misty Trees</h2>
18
      <button>more</button>
19
    </article>
20
  </div>
21
</section>
22
 
23
<section>
24
  <div class="wrp">
25
    <img src="http://myth.mtdemo.wpengine.com/wp-content/uploads/sites/28/2015/05/wide-open-road-1600x1067.jpg">
26
    <article>
27
      <date>march 14, 2015</date>
28
      <h2>Misty Trees</h2>
29
      <button>more</button>
30
    </article>
31
  </div>
32
</section>
33
 
34
<section>
35
  <div class="wrp">
36
    <img src="http://myth.mtdemo.wpengine.com/wp-content/uploads/sites/28/2015/05/getting-ready-1600x1065.jpg">
37
    <article>
38
      <date>march 14, 2015</date>
39
      <h2>Misty Trees</h2>
40
      <button>more</button>
41
    </article>
42
  </div>
43
</section>
44
 
45
<section>
46
  <div class="wrp">
47
    <img src="http://myth.mtdemo.wpengine.com/wp-content/uploads/sites/28/2015/05/lets-escape-1600x1067.jpg">
48
    <article>
49
      <date>march 14, 2015</date>
50
      <h2>Misty Trees</h2>
51
      <button>more</button>
52
    </article>
53
  </div>
54
</section>
55
 
56
<section>
57
  <div class="wrp">
58
    <img src="http://myth.mtdemo.wpengine.com/wp-content/uploads/sites/28/2014/05/gallery-1-1600x1064.jpg">
59
    <article>
60
      <date>march 14, 2015</date>
61
      <h2>Misty Trees</h2>
62
      <button>more</button>
63
    </article>
64
  </div>
65
</section>
66
 
67
<section>
68
  <div class="wrp">
69
    <img src="http://myth.mtdemo.wpengine.com/wp-content/uploads/sites/28/2014/05/gallery-4-1600x1066.jpg">
70
    <article>
71
      <date>march 14, 2015</date>
72
      <h2>Misty Trees</h2>
73
      <button>more</button>
74
    </article>
75
  </div>
76
</section>
77
 
78
<section>
79
  <div class="wrp">
80
    <img src="http://myth.mtdemo.wpengine.com/wp-content/uploads/sites/28/2014/05/video-1600x1067.jpg">
81
    <article>
82
      <date>march 14, 2015</date>
83
      <h2>Misty Trees</h2>
84
      <button>more</button>
85
    </article>
86
  </div>
87
</section>
88
 
89
<section>
90
  <div class="wrp">
91
    <img src="http://myth.mtdemo.wpengine.com/wp-content/uploads/sites/28/2014/05/gallery-1-1600x1064.jpg">
92
    <article>
93
      <date>march 14, 2015</date>
94
      <h2>Misty Trees</h2>
95
      <button>more</button>
96
    </article>
97
  </div>
98
</section>
 
CSS
@import url(http://fonts.googleapis.com/css?family=PT+Sans+Caption);
1
@import url(http://fonts.googleapis.com/css?family=PT+Sans+Caption);
2
 
3
* {
4
  margin: 0;
5
}
6
 
7
html, body {
8
  width: 100%;
9
  height: 100%;
10
  font-family: 'PT Sans Caption', sans-serif;
11
  color: #333;
12
}
13
 
14
h1, h2, h3, h4, h5, h6 {
15
  font-family: 'Garamond', serif;
16
}
17
 
18
section {
19
  float: left;
20
  display: table;
21
  
22
  width: 100%;
23
  min-height: 300px;
24
 
25
  background-image: url();
26
  background-size: cover;
27
  transition: width .4s;
28
}
29
 
30
@media screen and (min-width: 600px) {
31
  section {
32
    width: 50%;
33
  }
34
}
35
 
36
@media screen and (min-width: 1024px) {
37
  section {
38
    width: 33%;
39
  }
40
}
41
 
42
.wrp {
43
  position: relative;
44
  display: table-cell;
45
  vertical-align: middle;
46
  text-align: center;
47
}
48
 
49
section img {
50
  position: absolute;
51
  left: 0;
52
  top: 0;
53
  z-index: -1;
54
  width: 99%;
55
  height: 99%;
56
  object-fit: cover;
57
}
58
 
59
article {
60
  display: inline-block;
61
  padding: 40px 20px;
62
  width: 60%;
63
  height: 60%;
64
  
65
  opacity: 0;
66
  visibility: hidden;  
67
 
68
  background-color: rgba(255, 255, 255, .9);
69
  outline: 7px solid rgba(255, 255, 255, .5);
70
  
71
  transition: opacity .4s;
72
  will-change: opacity, visibility;
73
}
74
 
75
section:hover article {
76
  opacity: 1;
77
  visibility: visible;
78
}
79
 
80
article date {
81
  font-size: .8rem;
82
  font-weight: 300;
83
  text-transform: uppercase;
84
  color: #666;
85
}
86
 
87
article h2 {
88
  margin-bottom: 10px;
89
  font-weight: 300;
90
  font-style: italic;
91
}
92
 
93
article button {
94
  padding: 8px 12px;
95
  border: 2px solid #333;
96
  background: linear-gradient(#333, #333);
97
  background-repeat: no-repeat;
98
  background-size: 0% 100%;
99
  
100
  text-transform: uppercase;
101
  color: #333;
102
  
103
  transition-property: color, background-size;
104
  transition-duration: .2s;
105
  
106
  will-change: background-size;
107
}
108
 
109
article button:hover {
110
  background-size: 100% 100%;
111
  color: #fff;
112
}
 
JavaScript
'use strict';
1
'use strict';
2
 
3
var urlPrefix = 'http://myth.mtdemo.wpengine.com/wp-content/uploads/sites/28/2015/05/',
4
    imgs = [
5
        'misty-trees-1600x1067.jpg'
6
    ],
7
    section = document.createElement('section'),
8
    wrapper = document.createElement('div'),
9
    article = document.createElement('article'),
10
    date = document.createElement('date'),
11
    header = document.createElement('header'),
12
    button = document.createElement('button');
13
 
14
template.appendChild(document.createElement('div').classList.add());
15
 
16
imgs.forEach(function (item) {
17
  
18
});
 

Adaptive photo grid

CSSDeck G+