слайд 16:9 с таким же фото 16:9 подложки нет

This commit is contained in:
xomimishka committed 2025-07-12 10:51:28 +03:00
1 parent 353e2712cc
commit 4d6aab28c8
2 files changed
+94 -21

No files matched your search

+55 -13
View File
@@ -13,7 +13,21 @@
}
}
.swiper {
width: 100%;
height: 100%;
overflow: hidden;
}
.swiper-wrapper {
display: flex;
align-items: stretch;
}
.swiper-slide {
flex-shrink: 0;
width: 100%;
position: relative;
padding-top: 10px;
padding-bottom: 10px;
display: flex;
@@ -23,39 +37,67 @@
transform: translateZ(0);
backface-visibility: hidden;
perspective: 1000px;
box-sizing: border-box;
.slide-container {
position: relative;
width: 100%;
height: 100%;
padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
overflow: hidden;
border-radius: 8px;
pointer-events: none;
background-color: #f5f5f5;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
transition: box-shadow 0.3s ease;
&:hover {
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
}
.slide-background {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
top: -10%;
left: -10%;
right: -10%;
bottom: -10%;
background-size: cover;
background-position: center;
filter: blur(10px);
filter: blur(12px) brightness(0.9);
transform: scale(1.05);
z-index: 1;
opacity: 0.8;
}
.slide-image {
position: relative;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 350px;
height: 100%;
object-fit: contain;
object-position: center;
z-index: 2;
pointer-events: none;
transform: translateZ(0);
backface-visibility: hidden;
transition: transform 0.3s ease;
}
&.ratio-16-9 {
.slide-background {
display: none;
}
.slide-image {
object-fit: cover;
}
}
&.single {
.slide-container {
max-width: 80%;
margin: 0 auto;
}
}
}
@@ -63,10 +105,10 @@
justify-content: center;
.swiper-slide.single {
.slide-image {
width: 100%;
height: 100%;
border-radius: 0;
.slide-container {
padding-bottom: 0;
height: 60vh;
max-height: 600px;
}
}
}