.box{ text-align: center; box-shadow: 0 0 3px rgba(0,0,0,0.3); overflow: hidden; position: relative; } .box img{ width: 100%; height: auto; } .box .box-content{ width: 100%; height: 100%; padding: 25% 10px 0; color: #fff; position: absolute; top: 0; left: 0; opacity: 0; z-index: 1; transition: all 0.5s ease 0s; } .box:hover .box-content{ opacity: 1; } .box:before, .box:after, .box-content:before, .box-content:after{ content: ""; width: 50%; height: 50%; background-color: rgba(0,0,0,0.7); position: absolute; top: 0; left: 0; opacity: 0; transition: all 0.3s ease 0s; } .box:after, .box-content:after{ left: auto; right: 0; } .box:before{ transform: rotate(-90deg); transform-origin: right bottom; } .box:after{ transform: rotate(90deg); transform-origin: left bottom; } .box-content:before, .box-content:after{ top: auto; bottom:0; z-index: -1; } .box-content:before{ transform: rotate(90deg); transform-origin: top right; } .box-content:after{ transform: rotate(-90deg); transform-origin: top left; } .box:hover:before, .box:hover:after, .box:hover .box-content:before, .box:hover .box-content:after{ transform: rotate(0); opacity: 1; } .box .title{ font-size: 25px; font-weight: 600; margin: 0 0 10px 0; } .box .post{ display: block; font-size: 14px; font-style: italic; margin-bottom: 20px; } .box .icon{ padding: 0; margin: 0; list-style: none; } .box .icon li{ display: inline-block; margin-right: 10px; } .box .icon li a{ display: block; width: 33px; height: 33px; line-height: 33px; background: #fff; border-radius: 10px; font-size: 16px; color: #1da1f2; transition: all 0.5s ease 0s; } .box .icon li a:hover{ background: #1da1f2; border-radius: 50%; color: #fff; } @media only screen and (max-width:990px){ .box{ margin-bottom: 30px; } }