MatuMaKa

CSS1

Jul 10th, 2025
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 2.36 KB | Source Code | 0 0
  1. div.features {
  2.     display: flex;
  3.     flex-wrap: wrap;
  4.     gap: 10px;
  5.     width: calc(100% - 100px);
  6.     margin: 0px auto;
  7.     max-width: 2000px;
  8.     justify-content: space-between;
  9. }
  10. div.features .feature {
  11.     flex: 0 1 calc(12.5% - 11.25px);
  12.     box-sizing: border-box;
  13. }
  14. div.feature {
  15.     width: 100%;
  16.     height: 400px;
  17.     margin-bottom: 40px;
  18.     background-color: var(--stroke);
  19.     border-radius:var(--radius);
  20.     box-shadow: 0 4px 8px 0 #000;
  21.     display: inline-block;
  22.     overflow: hidden;
  23.     position: relative;
  24.     animation: FadeIn 1s ease;
  25. }
  26. div.feature img {
  27.     position: relative;
  28.     float: left;
  29.     width: 100%;
  30.     height: 100%;
  31.     object-fit: cover;
  32.     object-position: center;
  33.     transition: .2s ease;
  34.     filter:brightness(0.35);
  35. }
  36. div.feature:hover img {
  37.     transform: scale(1.3);
  38.     filter:brightness(0.5);
  39.     transition: .2s ease;
  40. }
  41. div.features:hover {
  42.     animation-play-state: paused;
  43. }
  44. div.feature div.info {
  45.     text-align: left;
  46.     background: linear-gradient(110deg, rgba(254,65,224,0.5) 0%, rgba(224,56,221,0) 65%);
  47.     background-position: -100px 0px;
  48.     background-repeat: no-repeat;
  49.     height: 100%;
  50.     width: calc(100% - 40px);
  51.     position: absolute;
  52.     display: block;
  53.     top: 0px;
  54.     padding: 20px;
  55.     transition: .5s ease;
  56. }
  57. div.feature div.info h1 {
  58.     margin: 2px;
  59.     transition: .5s ease;
  60.     overflow: hidden;
  61.     text-overflow: ellipsis;
  62. }
  63. div.feature div.info p {
  64.     font-size: 1.1em;
  65.     opacity: 0.5;
  66.     transform: translateX(0);
  67.     transition: .5s ease;
  68.     max-width: 300px;
  69.     overflow: hidden;
  70.     text-overflow: ellipsis;
  71. }
  72. div.feature:hover div.info p {
  73.     opacity: 1;
  74.     transform: translateX(5px);
  75.     transition: .5s ease;
  76. }
  77. div.feature:hover div.info h1 {
  78.     transform: translateX(2px);
  79.     transition: .5s ease;
  80. }
  81.  
  82. div.feature div.info:hover {
  83.     background-position: 0px 0px;
  84.     transition: .8s ease;
  85. }
  86.  
  87. .scroll-wrapper {
  88.     overflow: hidden;
  89.     width: 100%;
  90.     padding: 40px 0;
  91.     position: relative;
  92. }
  93.  
  94. .features {
  95.     display: flex;
  96.     flex-wrap: nowrap;
  97.     gap: 30px;
  98.     width: max-content;
  99.     animation: scroll-horizontal 60s linear infinite;
  100. }
  101.  
  102. @keyframes scroll-horizontal {
  103.   0% {
  104.     transform: translateX(0);
  105.   }
  106.   100% {
  107.     transform: translateX(-50%);
  108.   }
  109. }
  110.  
  111. .feature {
  112.     flex: 0 0 400px;
  113. }
Advertisement
Add Comment
Please, Sign In to add comment