Hadi1989

Untitled

Jan 19th, 2019
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 2.82 KB | None | 0 0
  1. body{
  2.     margin: 0;
  3.     padding: 0;
  4.     font-family: sans-serif;
  5.     background-color: #20024a
  6. }
  7. .container{
  8.     position: absolute;
  9.     top: 50%;
  10.     left: 50%;
  11.     transform: translate(-50%,-50%);
  12.     width: 1000px;
  13.     height: 500px;
  14.     display: flex;
  15. }
  16. .container .box{
  17.     position: relative;
  18.     width: 250px;
  19.     height: 500px;
  20.     background-color: #ccc;
  21.     transition: .5s;
  22. }
  23. .container .box:hover{
  24.     transform: scale(1.1);
  25.     z-index: 1;
  26.     box-shadow: 0 5px 20px rgba(0,0,0,1)
  27. }
  28. .container .box .thumb{
  29.     position: absolute;
  30.     width: 100%;
  31.     height: 250px;
  32.     overflow: hidden;
  33. }
  34. .container .box .details{
  35.     position: absolute;
  36.     width: 100%;
  37.     height: 250px;
  38.     overflow: hidden;
  39.     background-color: #262626;
  40. }
  41. .container .box:nth-child(odd) .thumb{
  42.     bottom: 0;
  43.     left: 0;
  44. }
  45. .container .box .thumb img{
  46.     width: 100%;
  47.     height: 100%;
  48. }
  49. .container .box:nth-child(even) .details{
  50.     bottom: 0;
  51.     left: 0;
  52. }
  53. .container .box:nth-child(1) .details{
  54.     background-color: #8553cb;
  55. }
  56. .container .box:nth-child(2) .details{
  57.     background-color: #fe8f01;
  58. }
  59. .container .box:nth-child(3) .details{
  60.     background-color: #79d400;
  61. }
  62. .container .box:nth-child(4) .details{
  63.     background-color: #ff3b34;
  64. }
  65. .container .box .details .content{
  66.     position: absolute;
  67.     top: calc(50% + 16px);
  68.     transform: translateY(-50%);
  69.     width: 100%;
  70.     padding: 20px;
  71.     box-sizing: border-box;
  72.     text-align: center;
  73.     transition: .5s;
  74. }
  75. .container .box:hover .details .content{
  76.     top: calc(50%)
  77. }
  78. .container .box .details .content .fas{
  79.     font-size: 80px;
  80.     color: #fff;
  81. }
  82. .container .box .details .content h3{
  83.     margin: 0;
  84.     padding: 0;
  85.     padding: 10px 0;
  86.     color: #fff;
  87. }
  88. .container .box .details .content a{
  89.     display: inline-block;
  90.     padding: 5px 20px;
  91.     color: #fff;
  92.     border: 2px solid #fff;
  93.     text-decoration: none;
  94.     transition: .5s;
  95.     border-radius: 20px;
  96.     transform: scale(0);
  97. }
  98. .container .box:hover .details .content a{
  99.     transform: scale(1);
  100. }
  101. .container .box .details .content a:hover{
  102.     background-color: #fff;
  103.     color: #262626;
  104. }
  105. @media (max-width: 1000px){
  106.     .container{
  107.         width: 100%;
  108.         height: auto;
  109.         padding: 20px;
  110.         box-sizing: border-box;
  111.     }
  112.     .container .box{
  113.         height: 250px;
  114.     }
  115.     .container .box .thumb{
  116.         display: none;
  117.     }
  118. }
  119. @media (max-width: 770px){
  120.     .container{
  121.         display: initial;
  122.     }
  123.     .container .box{
  124.         width: 50%;
  125.         height: 250px;
  126.         float: left;
  127.     }
  128. }
  129. @media (max-width: 480px){
  130.     .container{
  131.         top: 0;
  132.         left: 0;
  133.         transform: translate(0);
  134.     }
  135.     .container .box{
  136.         width: 100%;
  137.         height: 250px;
  138.         float: none;
  139.     }
  140. }
Advertisement
Add Comment
Please, Sign In to add comment