.flip-gallery {
width: 80%;
max-width: 810px;
max-height: 974px;
min-height: 70vh;
padding: 50px 0;
margin: 0 auto;
display: flex;
justify-content: center;
align-items: center;
opacity: 0;
transition: opacity 2s ease-in-out;
}
@media screen and (max-width: 375px) {
.flip-gallery {
width: 90%;
}
}
.flip-aspect {
position: relative;
width: 100%;
}
.flip-aspect-inner {
bottom: 0;
left: 0;
position: absolute;
right: 0;
top: 0;
}
.flip-gallery-wrapper {
height: 100%;
max-width: 810px;
max-height: 974px;
display: flex;
transition: margin-left 0.3s ease-in-out;
}
.flip-page,
.page-wrapper {
max-width: 405px;
max-height: 974px;
}
#initial-flip-size {
position: absolute;
opacity: 0;
visibility: hidden;
transform: translateX(-1000%);
height: 487px;
width: 405px;
}
@media screen and (max-width: 1200px) {
#initial-flip-size {
height: calc(
var(--flip-height-px)
+ (var(--flip-height) - var(--flip-height-min))
* ((100vw - 320px) / (1200 - 320))
);
width: calc(
var(--flip-width-px)
+ (var(--flip-width) - var(--flip-width-min))
* ((100vw - 320px) / (1200 - 320))
);
}
}
.flip-part {
cursor: pointer;
user-select: none;
position: relative;
max-height: 487px;
max-width: 405px;
display: flex;
justify-content: center;
perspective: 1500px;
}
.flip-part__page {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
transform-style: preserve-3d;
transition: 2s;
}
.flip-page-top .flip-part__page {
transform-origin: top center;
}
.flip-page-bottom .flip-part__page {
transform-origin: bottom center;
}
.flip-page-top .flip-part__page.front.openned {
transform: rotateX(180deg);
}
.flip-page-bottom .flip-part__page.front.openned {
transform: rotateX(-180deg);
}
.flip-part__page.front {
z-index: 2;
}
.flip-part__page.under {
z-index: 1;
}
.flip-page-top img,
.flip-page-bottom img,
.flip-part-backface img {
object-fit: cover;
position: absolute;
width: 100%;
height: 100%;
}
.flip-part-backface,
.flip-part-frontface {
position: absolute;
width: 100%;
height: 100%;
display: flex;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
}
.openned .flip-part-backface {
z-index: 1;
}
.openned .flip-part-frontface {
z-index: -1;
}
.flip-page-top .openned .flip-part-frontface {
box-shadow: 0px 15px 20px -10px rgba(0,0,0,1);
}
.flip-page-bottom .openned .flip-part-frontface {
box-shadow: 0px -15px 20px -10px rgba(0,0,0,1);
}
.flip-part-backface {
transform: rotateY(180deg);
}
.page-wrapper,
.page-wrapper > div {
overflow: visible !important;
}
.page-wrapper.turning,
.page-wrapper.turning > div {
overflow: hidden !important;
} .flip-page .flip-page-btn {
display: flex;
justify-content: center;
cursor: pointer;
position: absolute;
padding: 15px !important;
min-width: 15%;
background-color: #2e8149;
z-index: 1000;
border-radius: 20px;
opacity: 0.8;
transition: 0.5s;
}
.flip-page .flip-page-btn.transparent {
opacity: 0;
}
.flip-page .flip-page-btn.right {
right: 10px;
}
.flip-page .flip-page-btn.left {
left: 10px;
}
.flip-page-top .flip-page-btn {
bottom: 10px;
}
.flip-page-bottom .flip-page-btn {
top: 10px;
}
.flip-part:hover .flip-page-btn.transparent {
opacity: 0.4;
}
.flip-part .flip-page-btn.transparent:active,
.flip-part .flip-page-btn.transparent:hover {
opacity: 0.8;
}
.flip-page-btn > div {
position: relative;
background: #ffffff;
height: 35px;
width: 4px;
transition: 0.5s;
border-radius: 10px;
}
.flip-page-btn > div::before {
transform: rotate(-35deg);
}
.flip-page-btn.prev > div::before {
transform: rotate(calc(-35deg * 4));
}
.flip-page-btn > div::after {
transform: rotate(35deg);
}
.flip-page-btn.prev > div::after {
transform: rotate(calc(35deg * 4));
}
.flip-page-btn > div::before,
.flip-page-btn > div::after {
display: block;
content: "";
position: absolute;
background: #ffffff;
width: 4px;
height: 20px;
border-radius: 10px;
transition: 0.5s;
}
.flip-page-top .flip-page-btn > div {
transform-origin: bottom center;
}
.flip-page-top .flip-page-btn > div::before,
.flip-page-top .flip-page-btn > div::after {
transform-origin: top;
top: 0;
}
.flip-page-top .flip-page-btn.prev > div::before,
.flip-page-top .flip-page-btn.prev > div::after {
top: 100%;
}
.flip-page-bottom .flip-page-btn > div {
transform-origin: top center;
}
.flip-page-bottom .flip-page-btn > div::before,
.flip-page-bottom .flip-page-btn > div::after {
transform-origin: bottom;
bottom: 0;
}
.flip-page-bottom .flip-page-btn.prev > div::before,
.flip-page-bottom .flip-page-btn.prev > div::after {
bottom: 100%;
} .isTouch .flip-part .flip-page-btn,
.isTouch .flip-arrow.shown {
opacity: 0.4;
}
@media screen and (max-width: 768px) {
.flip-page .flip-page-btn {
padding: 10px 15px !important;
border-radius: 12px;
}
.flip-part .flip-page-btn {
opacity: 0.8;
}
.flip-part:hover .flip-page-btn.transparent {
opacity: 0.2;
}
.flip-part .flip-page-btn.transparent {
opacity: 0.2;
}
.flip-part .flip-page-btn.transparent:hover {
opacity: 0.2;
}
.flip-page-btn > div {
height: 25px;
width: 3px;
}
.flip-page-btn > div::before,
.flip-page-btn > div::after {
height: 15px;
width: 3px;
}
}
@media screen and (max-width: 576px) {
.flip-page .flip-page-btn {
padding: 5px 12px !important;
border-radius: 9px;
}
.flip-page-top .flip-page-btn {
bottom: 5px;
}
.flip-page-bottom .flip-page-btn {
top: 5px;
}
.flip-page-btn > div {
height: 18px;
width: 2px;
}
.flip-page-btn > div::before,
.flip-page-btn > div::after {
height: 12px;
width: 2px;
}
} .flip-arrow {
cursor: pointer;
display: none;
align-items: center;
justify-content: center;
height: 50%;
width: 20px;
background-color: #2e8149;
position: absolute;
top: 25%;
transition: all 0.3s ease-in-out;
}
.flip-arrow.shown {
display: flex;
opacity: 0.8;
}
.flip-arrow.prev {
left: -20px;
border-top-left-radius: 15px;
border-bottom-left-radius: 15px;
}
.flip-arrow.next {
right: -20px;
border-top-right-radius: 15px;
border-bottom-right-radius: 15px;
}
.flip-arrow svg {
position: absolute;
height: 30px;
color: #ffffff;
}
@media screen and (min-width: 768px) {
.flip-arrow.shown {
opacity: 0.4;
}
.flip-arrow.shown:hover {
opacity: 0.8;
}
}