.box{ text-align: center; overflow: hidden; perspective: 800px; position: relative; } .box img{ width: 100%; height: auto; } .box .box-content{ width: 100%; height: 100%; position: absolute; top: 0; left: 0; } .box:before, .box:after, .box .box-content:before, .box .box-content:after{ content: ""; width: 100%; height: 25%; background: linear-gradient(rgba(0,0,0,0.9),transparent,rgba(0,0,0,0.9)) ; position: absolute; top: 0; left: 0; opacity: 0; transform: rotateX(180deg); transform-origin: top; transition: all 0.25s steps(4) 0s; } .box:after{ top: 25%; transition-delay: 0.1s; } .box .box-content:before{ height: 25.1%; top: 49.8%; transition-delay: 0.2s; } .box .box-content:after{ top: 75%; transition-delay: 0.3s; } .box:hover:before, .box:hover:after, .box:hover .box-content:before, .box:hover .box-content:after{ opacity: 1; transform: rotateX(0); } .box .inner-content{ width: 100%; position: absolute; top: 53%; left: 50%; opacity: 0; z-index: 2; transform: translate(-50%, -50%); transition: all 0.3s ease 0.2s; } .box:hover .inner-content{ opacity: 1; } .box .title{ width: 60%; font-size: 18px; color: #fff; text-transform: uppercase; text-shadow: 0 0 5px #000; margin: 0 auto 5px; opacity: 0; overflow: hidden; position: relative; transition: all 0.3s ease 0.2s; } .box:hover .title{ opacity: 1; } .box .post{ display: inline-block; font-size: 22px; font-weight: 600; color: #fd5f42; text-transform: uppercase; border-radius: 10px 0; margin-bottom: 7px; position: relative; opacity: 0; overflow: hidden; } .box:hover .post{ opacity: 1; } .box .title:after, .box .post:after{ content: ""; width: 100%; height: 100%; background: #fff; border: 1px solid #000; padding: 5px 0; position: absolute; top: 0; right: 0; transform: translateX(100%); transition: all 0.3s ease 0.2s; } .box .post:after, .box:hover .title:after{ transform: translateX(-100%); } .box:hover .post:after{ transform: translateX(100%); } .box .icon{ width: 100%; padding: 0; margin: 0; list-style: none; position: absolute; bottom: 30px; left: 50%; z-index: 2; opacity: 0; transform: translateX(-50%); transition: all 400ms cubic-bezier(1.000, -0.600, 0.570, -0.150); } .box:hover .icon{ opacity: 1; } .box .icon li{ display: inline-block; margin: 0 5px; transition: all 0.3s ease 0s; } .box .icon li a{ display: block; width: 35px; height: 35px; line-height: 35px; background: #fd5f42; font-size: 19px; color: #fff; transition: all 0.3s ease 0s; } .box .icon li a:hover{ background: #fff; border-radius: 20px; color: #fd5f42; box-shadow: 0 0 0 3px #fd5f42; } @media only screen and (max-width:990px){ .box{ margin-bottom: 30px; } }