Advertisement
victorumeh

my page slider

Feb 14th, 2022
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 2.49 KB | None | 0 0
  1. @import url("https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap");
  2.  
  3. * {
  4.   margin: 0;
  5.   padding: 0;
  6.   box-sizing: border-box;
  7.   font-family: "Poppins", sans-serif;
  8. }
  9.  
  10. body {
  11.   height: 100vh;
  12.   display: flex;
  13.   justify-content: center;
  14.   align-items: center;
  15.   background: #000116;
  16. }
  17.  
  18. .slider {
  19.   position: relative;
  20.   background: #5d64e9;
  21.   width: 1200px;
  22.   min-height: 500px;
  23.   margin: 20px;
  24.   overflow: hidden;
  25.   border-radius: 10px;
  26. }
  27.  
  28. .slider .slide {
  29.   position: absolute;
  30.   width: 100%;
  31.   height: 100%;
  32.   clip-path: circle(0% at 0 50%);
  33. }
  34.  
  35. .slider .slide.active {
  36.   clip-path: circle(150% at 0 50%);
  37.   transition: 2s;
  38. }
  39.  
  40. .slider .slide img {
  41.   position: absolute;
  42.   width: 100%;
  43.   height: 100%;
  44.   object-fit: cover;
  45. }
  46.  
  47. .slider .slide .info {
  48.   position: absolute;
  49.   color: #222;
  50.   background: rgba(255, 255, 255, 0.3);
  51.   width: 75%;
  52.   margin-top: 50px;
  53.   margin-left: 50px;
  54.   padding: 20px;
  55.   border-radius: 5px;
  56.   box-shadow: 0 5px 25px rgb(1 1 1 / 5%);
  57. }
  58.  
  59. .slider .slide .info h2 {
  60.   font-size: 2em;
  61.   font-weight: 800;
  62. }
  63.  
  64. .slider .slide .info p {
  65.   font-size: 1em;
  66.   font-weight: 400;
  67. }
  68.  
  69. .navigation {
  70.   height: 500px;
  71.   display: flex;
  72.   align-items: center;
  73.   justify-content: space-between;
  74.   opacity: 0;
  75.   transition: opacity 0.5s ease;
  76. }
  77.  
  78. .slider:hover .navigation {
  79.   opacity: 1;
  80. }
  81.  
  82. .prev-btn,
  83. .next-btn {
  84.   z-index: 999;
  85.   font-size: 2em;
  86.   color: #222;
  87.   background: rgba(255, 255, 255, 0.8);
  88.   padding: 10px;
  89.   cursor: pointer;
  90. }
  91.  
  92. .prev-btn {
  93.   border-top-right-radius: 3px;
  94.   border-bottom-right-radius: 3px;
  95. }
  96.  
  97. .next-btn {
  98.   border-top-left-radius: 3px;
  99.   border-bottom-left-radius: 3px;
  100. }
  101.  
  102. .navigation-visibility {
  103.   z-index: 999;
  104.   display: flex;
  105.   justify-content: center;
  106. }
  107.  
  108. .navigation-visibility .slide-icon {
  109.   z-index: 999;
  110.   background: rgba(255, 255, 255, 0.5);
  111.   width: 20px;
  112.   height: 10px;
  113.   transform: translateY(-50px);
  114.   margin: 0 6px;
  115.   border-radius: 2px;
  116.   box-shadow: 0 5px 25px rgb(1 1 1 / 20%);
  117. }
  118.  
  119. .navigation-visibility .slide-icon.active {
  120.   background: #4285f4;
  121. }
  122.  
  123. @media (max-width: 900px) {
  124.   .slider {
  125.     width: 100%;
  126.   }
  127.  
  128.   .slider .slide .info {
  129.     position: relative;
  130.     width: 80%;
  131.     margin-left: auto;
  132.     margin-right: auto;
  133.   }
  134. }
  135.  
  136. @media (max-width: 500px) {
  137.   .slider .slide .info h2 {
  138.     font-size: 1.8em;
  139.     line-height: 40px;
  140.   }
  141.  
  142.   .slider .slide .info p {
  143.     font-size: 0.9em;
  144.   }
  145. }
  146.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement