Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- body{
- margin: 0;
- padding: 0;
- font-family: sans-serif;
- background-color: #20024a
- }
- .container{
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%,-50%);
- width: 1000px;
- height: 500px;
- display: flex;
- }
- .container .box{
- position: relative;
- width: 250px;
- height: 500px;
- background-color: #ccc;
- transition: .5s;
- }
- .container .box:hover{
- transform: scale(1.1);
- z-index: 1;
- box-shadow: 0 5px 20px rgba(0,0,0,1)
- }
- .container .box .thumb{
- position: absolute;
- width: 100%;
- height: 250px;
- overflow: hidden;
- }
- .container .box .details{
- position: absolute;
- width: 100%;
- height: 250px;
- overflow: hidden;
- background-color: #262626;
- }
- .container .box:nth-child(odd) .thumb{
- bottom: 0;
- left: 0;
- }
- .container .box .thumb img{
- width: 100%;
- height: 100%;
- }
- .container .box:nth-child(even) .details{
- bottom: 0;
- left: 0;
- }
- .container .box:nth-child(1) .details{
- background-color: #8553cb;
- }
- .container .box:nth-child(2) .details{
- background-color: #fe8f01;
- }
- .container .box:nth-child(3) .details{
- background-color: #79d400;
- }
- .container .box:nth-child(4) .details{
- background-color: #ff3b34;
- }
- .container .box .details .content{
- position: absolute;
- top: calc(50% + 16px);
- transform: translateY(-50%);
- width: 100%;
- padding: 20px;
- box-sizing: border-box;
- text-align: center;
- transition: .5s;
- }
- .container .box:hover .details .content{
- top: calc(50%)
- }
- .container .box .details .content .fas{
- font-size: 80px;
- color: #fff;
- }
- .container .box .details .content h3{
- margin: 0;
- padding: 0;
- padding: 10px 0;
- color: #fff;
- }
- .container .box .details .content a{
- display: inline-block;
- padding: 5px 20px;
- color: #fff;
- border: 2px solid #fff;
- text-decoration: none;
- transition: .5s;
- border-radius: 20px;
- transform: scale(0);
- }
- .container .box:hover .details .content a{
- transform: scale(1);
- }
- .container .box .details .content a:hover{
- background-color: #fff;
- color: #262626;
- }
- @media (max-width: 1000px){
- .container{
- width: 100%;
- height: auto;
- padding: 20px;
- box-sizing: border-box;
- }
- .container .box{
- height: 250px;
- }
- .container .box .thumb{
- display: none;
- }
- }
- @media (max-width: 770px){
- .container{
- display: initial;
- }
- .container .box{
- width: 50%;
- height: 250px;
- float: left;
- }
- }
- @media (max-width: 480px){
- .container{
- top: 0;
- left: 0;
- transform: translate(0);
- }
- .container .box{
- width: 100%;
- height: 250px;
- float: none;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment