.grid { position: relative; text-align: center; width:440px;float:left; } .gridmargin {margin:0 20px 0 0;} /* Common style */ .grid figure { position: relative; float: left; overflow: hidden; max-width: 440px; max-height: 330px; background: #f2be31; text-align: center; cursor: pointer; } .grid figure img { position: relative; display: block; min-height: 100%; max-width: 100%; opacity: 0.8; } .grid figure figcaption { padding: 135px 0 0 0; text-transform: uppercase; -webkit-backface-visibility: hidden; backface-visibility: hidden; text-align: center; color: #000; } .grid figure figcaption:hover { color: #000; } .grid figure figcaption::before, .grid figure figcaption::after { pointer-events: none; } .grid figure figcaption, .grid figure figcaption > a { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } /* Anchor will cover the whole item by default */ /* For some effects it will show as a button */ .grid figure figcaption > a { z-index: 1000; white-space: nowrap; font-size: 0; opacity: 0; } .grid figure p {font-size: 24px;letter-spacing:3px;} /*-----------------*/ /***** Apollo *****/ /*-----------------*/ figure.effect-apollo { background: #fff; } figure.effect-apollo img { opacity: 0.95; -webkit-transition: opacity 0.35s, -webkit-transform 0.35s; transition: opacity 0.35s, transform 0.35s; -webkit-transform: scale3d(1.05,1.05,1); transform: scale3d(1.05,1.05,1); } figure.effect-apollo figcaption::before { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255,255,255,0.5); content: ''; -webkit-transition: -webkit-transform 0.6s; transition: transform 0.6s; -webkit-transform: scale3d(1.9,1.4,1) rotate3d(0,0,1,45deg) translate3d(0,-100%,0); transform: scale3d(1.9,1.4,1) rotate3d(0,0,1,45deg) translate3d(0,-100%,0); } figure.effect-apollo:hover img { opacity: 0.6; -webkit-transform: scale3d(1,1,1); transform: scale3d(1,1,1); } figure.effect-apollo:hover figcaption::before { -webkit-transform: scale3d(1.9,1.4,1) rotate3d(0,0,1,45deg) translate3d(0,100%,0); transform: scale3d(1.9,1.4,1) rotate3d(0,0,1,45deg) translate3d(0,100%,0); } /* RESP */ @media only screen and (min-width: 1180px) and (max-width: 1380px){ .grid {width:360px;float:left;} .grid figure {max-width: 360px;max-height: 320px;} .grid figure figcaption {padding: 95px 0 0 0;} } @media only screen and (min-width: 959px) and (max-width: 1180px){ .grid {width:300px;float:left;} .grid figure {max-width: 300px;max-height: 250px;} .grid figure figcaption {padding: 95px 0 0 0;} } @media only screen and (min-width: 768px) and (max-width: 959px){ .grid {width:100%;float:none;margin:0px auto 20px auto;} .grid figure {float: none;margin:0px auto;} } @media only screen and (min-width: 480px) and (max-width: 767px){ .grid {width:100%;float:none;margin:0px auto 20px auto;} .grid figure {float: none;margin:0px auto;} } @media only screen and (min-width: 320px) and (max-width: 479px){ .grid {width:100%;float:none;margin:0px auto 20px auto;} .grid figure {float: none;max-width: 280px;max-height: 330px;margin:0px auto;} .grid figure figcaption {padding: 95px 0 0 0;} }