snkcgw/css/new_file.html

203 lines
7.4 KiB
HTML

<html lang="en"><head>
<meta charset="utf-8">
<title>Swiper demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
<!-- Link Swiper's CSS -->
<link rel="stylesheet" href="../package/swiper-bundle.min.css">
<!-- Demo styles -->
<style>
html,
body {
position: relative;
height: 100%;
}
body {
background: #eee;
font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
font-size: 14px;
color: #000;
margin: 0;
padding: 0;
}
.swiper {
width: 100%;
height: 100%;
}
.swiper-slide {
text-align: center;
font-size: 18px;
background: #fff;
/* Center slide text vertically */
display: -webkit-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
-webkit-justify-content: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center;
}
.swiper-slide img {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
}
body {
background: #000;
color: #000;
}
.swiper {
width: 100%;
height: 300px;
margin-left: auto;
margin-right: auto;
}
.swiper-slide {
background-size: cover;
background-position: center;
}
.mySwiper2 {
height: 80%;
width: 100%;
}
.mySwiper {
height: 20%;
box-sizing: border-box;
padding: 10px 0;
}
.mySwiper .swiper-slide {
width: 25%;
height: 100%;
opacity: 0.4;
}
.mySwiper .swiper-slide-thumb-active {
opacity: 1;
}
.swiper-slide img {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
}
</style>
</head>
<body>
<!-- Swiper -->
<div style="--swiper-navigation-color: #fff; --swiper-pagination-color: #fff" class="swiper mySwiper2 swiper-initialized swiper-horizontal swiper-pointer-events">
<div class="swiper-wrapper" id="swiper-wrapper-655c95e10bc9ce18c" aria-live="polite" style="transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;">
<div class="swiper-slide swiper-slide-active" role="group" aria-label="1 / 10" style="width: 800px; margin-right: 10px;">
<img src="./images/nature-1.jpg">
</div>
<div class="swiper-slide swiper-slide-next" role="group" aria-label="2 / 10" style="width: 800px; margin-right: 10px;">
<img src="./images/nature-2.jpg">
</div>
<div class="swiper-slide" role="group" aria-label="3 / 10" style="width: 800px; margin-right: 10px;">
<img src="./images/nature-3.jpg">
</div>
<div class="swiper-slide" role="group" aria-label="4 / 10" style="width: 800px; margin-right: 10px;">
<img src="./images/nature-4.jpg">
</div>
<div class="swiper-slide" role="group" aria-label="5 / 10" style="width: 800px; margin-right: 10px;">
<img src="./images/nature-5.jpg">
</div>
<div class="swiper-slide" role="group" aria-label="6 / 10" style="width: 800px; margin-right: 10px;">
<img src="./images/nature-6.jpg">
</div>
<div class="swiper-slide" role="group" aria-label="7 / 10" style="width: 800px; margin-right: 10px;">
<img src="./images/nature-7.jpg">
</div>
<div class="swiper-slide" role="group" aria-label="8 / 10" style="width: 800px; margin-right: 10px;">
<img src="./images/nature-8.jpg">
</div>
<div class="swiper-slide" role="group" aria-label="9 / 10" style="width: 800px; margin-right: 10px;">
<img src="./images/nature-9.jpg">
</div>
<div class="swiper-slide" role="group" aria-label="10 / 10" style="width: 800px; margin-right: 10px;">
<img src="./images/nature-10.jpg">
</div>
</div>
<div class="swiper-button-next" tabindex="0" role="button" aria-label="Next slide" aria-controls="swiper-wrapper-655c95e10bc9ce18c" aria-disabled="false"></div>
<div class="swiper-button-prev swiper-button-disabled" tabindex="-1" role="button" aria-label="Previous slide" aria-controls="swiper-wrapper-655c95e10bc9ce18c" aria-disabled="true"></div>
<span class="swiper-notification" aria-live="assertive" aria-atomic="true"></span></div>
<div thumbsslider="" class="swiper mySwiper swiper-initialized swiper-horizontal swiper-pointer-events swiper-free-mode swiper-thumbs">
<div class="swiper-wrapper" id="swiper-wrapper-9c331cd4f988d4ec" aria-live="polite" style="transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;">
<div class="swiper-slide swiper-slide-visible swiper-slide-active swiper-slide-thumb-active" role="group" aria-label="1 / 10" style="width: 192.5px; margin-right: 10px;">
<img src="./images/nature-1.jpg">
</div>
<div class="swiper-slide swiper-slide-visible swiper-slide-next" role="group" aria-label="2 / 10" style="width: 192.5px; margin-right: 10px;">
<img src="./images/nature-2.jpg">
</div>
<div class="swiper-slide swiper-slide-visible" role="group" aria-label="3 / 10" style="width: 192.5px; margin-right: 10px;">
<img src="./images/nature-3.jpg">
</div>
<div class="swiper-slide swiper-slide-visible" role="group" aria-label="4 / 10" style="width: 192.5px; margin-right: 10px;">
<img src="./images/nature-4.jpg">
</div>
<div class="swiper-slide" role="group" aria-label="5 / 10" style="width: 192.5px; margin-right: 10px;">
<img src="./images/nature-5.jpg">
</div>
<div class="swiper-slide" role="group" aria-label="6 / 10" style="width: 192.5px; margin-right: 10px;">
<img src="./images/nature-6.jpg">
</div>
<div class="swiper-slide" role="group" aria-label="7 / 10" style="width: 192.5px; margin-right: 10px;">
<img src="./images/nature-7.jpg">
</div>
<div class="swiper-slide" role="group" aria-label="8 / 10" style="width: 192.5px; margin-right: 10px;">
<img src="./images/nature-8.jpg">
</div>
<div class="swiper-slide" role="group" aria-label="9 / 10" style="width: 192.5px; margin-right: 10px;">
<img src="./images/nature-9.jpg">
</div>
<div class="swiper-slide" role="group" aria-label="10 / 10" style="width: 192.5px; margin-right: 10px;">
<img src="./images/nature-10.jpg">
</div>
</div>
<span class="swiper-notification" aria-live="assertive" aria-atomic="true"></span></div>
<!-- Swiper JS -->
<script src="../package/swiper-bundle.min.js"></script>
<!-- Initialize Swiper -->
<script>
var viewSwiper = new Swiper(".view .swiper", {
spaceBetween: 10,
slidesPerView: 4,
freeMode: true,
watchSlidesProgress: true,
});
var previewSwiper = new Swiper(".preview .swiper", {
spaceBetween: 10,
navigation: {
nextEl: ".swiper-button-next",
prevEl: ".swiper-button-prev",
},
thumbs: {
swiper: viewSwiper,
},
});
</script>
</body></html>