Advertisement
pranjal1805

Untitled

Aug 17th, 2022
666
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 3.61 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3.  
  4. <head>
  5.   <meta charset="utf-8" />
  6.   <title>Swiper demo</title>
  7.   <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1" />
  8.   <!-- Link Swiper's CSS -->
  9.   <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper/swiper-bundle.min.css" />
  10.  
  11.   <!-- Demo styles -->
  12.   <style>
  13.     html,
  14.     body {
  15.       position: relative;
  16.       height: 100%;
  17.     }
  18.  
  19.     body {
  20.       background: #eee;
  21.       font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
  22.       font-size: 14px;
  23.       color: #000;
  24.       margin: 0;
  25.       padding: 0;
  26.     }
  27.  
  28.     body {
  29.       background: peachpuff;
  30.       font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
  31.       font-size: 14px;
  32.       color: #000;
  33.       margin: 0;
  34.       padding: 0;
  35.     }
  36.  
  37.     html,
  38.     body {
  39.       position: relative;
  40.       height: 100%;
  41.     }
  42.  
  43.     body {
  44.       display: flex;
  45.       justify-content: center;
  46.       align-items: center;
  47.     }
  48.  
  49.     .swiper {
  50.       width: 240px;
  51.       height: 320px;
  52.     }
  53.  
  54.     .swiper-slide {
  55.       display: flex;
  56.       align-items: center;
  57.       justify-content: center;
  58.       border-radius: 18px;
  59.       font-size: 22px;
  60.       font-weight: bold;
  61.       color: #fff;
  62.     }
  63.  
  64.     .rectangle{
  65.             width: 210px;
  66.       height: 280px;
  67.       display: flex;
  68.       align-items: center;
  69.       justify-content: center;
  70.       border-radius: 18px;
  71.       font-size: 22px;
  72.       font-weight: bold;
  73.       background-color: #b886c1;
  74.     }
  75.  
  76.     .image{
  77.       margin-left: -8%;
  78.     }
  79.  
  80.     .swiper-slide:nth-child(1n) {
  81.       background-color: #fff;
  82.     }
  83.  
  84.     .swiper-slide:nth-child(2n) {
  85.       background-color: rgb(0, 140, 255);
  86.     }
  87.  
  88.     .swiper-slide:nth-child(3n) {
  89.       background-color: rgb(10, 184, 111);
  90.     }
  91.  
  92.     .swiper-slide:nth-child(4n) {
  93.       background-color: rgb(211, 122, 7);
  94.     }
  95.  
  96.     .swiper-slide:nth-child(5n) {
  97.       background-color: rgb(118, 163, 12);
  98.     }
  99.  
  100.     .swiper-slide:nth-child(6n) {
  101.       background-color: rgb(180, 10, 47);
  102.     }
  103.  
  104.     .swiper-slide:nth-child(7n) {
  105.       background-color: rgb(35, 99, 19);
  106.     }
  107.  
  108.     .swiper-slide:nth-child(8n) {
  109.       background-color: rgb(0, 68, 255);
  110.     }
  111.  
  112.     .swiper-slide:nth-child(9n) {
  113.       background-color: rgb(218, 12, 218);
  114.     }
  115.  
  116.     .swiper-slide:nth-child(10n) {
  117.       background-color: rgb(54, 94, 77);
  118.     }
  119.    
  120.     #header{
  121.       margin-top: -2%;
  122.       margin-left: 10%;
  123.     }
  124.   </style>
  125. </head>
  126.  
  127. <body>
  128.   <!-- Swiper -->
  129.  
  130.   <div class="swiper mySwiper">
  131.     <div class="swiper-wrapper">
  132.       <div class="swiper-slide"><div class="rectangle">
  133.      
  134.         <div class="rectangle1">
  135.           <div class="circle">
  136.             <div class="image">
  137.               <img src="images/art_gallery.png" style="width: 110%">
  138.             </div>
  139.           </div>
  140.          
  141.         </div>
  142.        
  143.      
  144.       </div></div>
  145.       <div class="swiper-slide">Slide 2</div>
  146.       <div class="swiper-slide">Slide 3</div>
  147.       <div class="swiper-slide">Slide 4</div>
  148.       <div class="swiper-slide">Slide 5</div>
  149.       <div class="swiper-slide">Slide 6</div>
  150.       <div class="swiper-slide">Slide 7</div>
  151.       <div class="swiper-slide">Slide 8</div>
  152.       <div class="swiper-slide">Slide 9</div>
  153.     </div>
  154.   </div>
  155.  
  156.   <!-- Swiper JS -->
  157.   <script src="https://cdn.jsdelivr.net/npm/swiper/swiper-bundle.min.js"></script>
  158.  
  159.   <!-- Initialize Swiper -->
  160.   <script>
  161.     var swiper = new Swiper(".mySwiper", {
  162.       effect: "cards",
  163.       grabCursor: true,
  164.     });
  165.   </script>
  166. </body>
  167.  
  168. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement