Minor updates

This commit is contained in:
Tony Air 2019-11-27 12:09:35 +07:00
parent 7777c5f6fb
commit bbff74cf12
3 changed files with 105 additions and 80 deletions

View File

@ -1,5 +1,5 @@
/* /*
* MetaLightbox v0.7 * MetaLightbox
* https://tony.twma.pro * https://tony.twma.pro
* *
*/ */

View File

@ -85,4 +85,4 @@ $lightbox-breakpoint: 576px !default;
.meta-lightbox-theme-default .meta-lightbox-close { .meta-lightbox-theme-default .meta-lightbox-close {
opacity: 1; opacity: 1;
} }
} }

View File

@ -1,36 +1,41 @@
.meta-lightbox-overlay { .meta-lightbox-overlay {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
z-index: 99998; z-index: 99998;
width: 100%; width: 100%;
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
visibility: hidden; visibility: hidden;
opacity: 0; opacity: 0;
box-sizing: border-box; box-sizing: border-box;
&.meta-lightbox-open {
visibility: visible;
opacity: 1;
}
} }
.meta-lightbox-overlay.meta-lightbox-open {
visibility: visible; .meta-lightbox-wrap {
opacity: 1; position: absolute;
} top: 10%;
.meta-lightbox-wrap { bottom: 10%;
position: absolute; left: 10%;
top: 10%; right: 10%;
bottom: 10%;
left: 10%;
right: 10%;
} }
.meta-lightbox-content { .meta-lightbox-content {
width: 100%; width: 100%;
height: 100%; height: 100%;
.meta-lightbox-zoom-wrapper { .meta-lightbox-zoom-wrapper {
display:block; display: block;
height: 100%; height: 100%;
width: 100%; width: 100%;
&:after { &:after {
color:#fff; color: #fff;
font:normal normal normal 14px/1 FontAwesome; font: normal normal normal 14px/1 FontAwesome;
content: "\f00e"; content: "\f00e";
position: absolute; position: absolute;
right: 1em; right: 1em;
@ -40,62 +45,73 @@
} }
} }
} }
.meta-lightbox-title-wrap { .meta-lightbox-title-wrap {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
left: 0; left: 0;
width: 100%; width: 100%;
z-index: 99999; z-index: 99999;
text-align: center; text-align: center;
} }
.meta-lightbox-nav { display: none; }
.meta-lightbox-nav {
display: none;
}
.meta-lightbox-prev { .meta-lightbox-prev {
position: absolute; position: absolute;
top: 50%; top: 50%;
left: 0; left: 0;
} }
.meta-lightbox-next { .meta-lightbox-next {
position: absolute; position: absolute;
top: 50%; top: 50%;
right: 0; right: 0;
} }
.meta-lightbox-close { .meta-lightbox-close {
position: absolute; position: absolute;
top: 2%; top: 2%;
right: 2%; right: 2%;
} }
.meta-lightbox-image { .meta-lightbox-image {
text-align: center; text-align: center;
img { img {
max-width: 100%; max-width: 100%;
max-height: 100%; max-height: 100%;
width: auto; width: auto;
height: auto; height: auto;
vertical-align: middle; vertical-align: middle;
} }
} }
.meta-lightbox-content iframe { .meta-lightbox-content iframe {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.meta-lightbox-inline, .meta-lightbox-inline,
.meta-lightbox-ajax { .meta-lightbox-ajax {
max-height: 100%; max-height: 100%;
overflow: auto; overflow: auto;
} }
.meta-lightbox-error { .meta-lightbox-error {
display: table; display: table;
text-align: center; text-align: center;
width: 100%; width: 100%;
height: 100%; height: 100%;
color: #fff; color: #fff;
text-shadow: 0 1px 1px #000; text-shadow: 0 1px 1px #000;
} }
.meta-lightbox-error p { .meta-lightbox-error p {
display: table-cell; display: table-cell;
vertical-align: middle; vertical-align: middle;
} }
/* Effects /* Effects
@ -107,16 +123,17 @@
.meta-lightbox-notouch .meta-lightbox-effect-slideUp, .meta-lightbox-notouch .meta-lightbox-effect-slideUp,
.meta-lightbox-notouch .meta-lightbox-effect-slideDown, .meta-lightbox-notouch .meta-lightbox-effect-slideDown,
.meta-lightbox-notouch .meta-lightbox-effect-fall { .meta-lightbox-notouch .meta-lightbox-effect-fall {
transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out;
} }
/* fadeScale */ /* fadeScale */
.meta-lightbox-effect-fadeScale .meta-lightbox-wrap { .meta-lightbox-effect-fadeScale .meta-lightbox-wrap {
transition: all 0.3s; transition: all 0.3s;
transform: scale(0.7); transform: scale(0.7);
} }
.meta-lightbox-effect-fadeScale.meta-lightbox-open .meta-lightbox-wrap { .meta-lightbox-effect-fadeScale.meta-lightbox-open .meta-lightbox-wrap {
transform: scale(1); transform: scale(1);
} }
/* slideLeft / slideRight / slideUp / slideDown */ /* slideLeft / slideRight / slideUp / slideDown */
@ -124,39 +141,47 @@
.meta-lightbox-effect-slideRight .meta-lightbox-wrap, .meta-lightbox-effect-slideRight .meta-lightbox-wrap,
.meta-lightbox-effect-slideUp .meta-lightbox-wrap, .meta-lightbox-effect-slideUp .meta-lightbox-wrap,
.meta-lightbox-effect-slideDown .meta-lightbox-wrap { .meta-lightbox-effect-slideDown .meta-lightbox-wrap {
transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9); transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
} }
.meta-lightbox-effect-slideLeft .meta-lightbox-wrap { .meta-lightbox-effect-slideLeft .meta-lightbox-wrap {
transform: translateX(-10%); transform: translateX(-10%);
} }
.meta-lightbox-effect-slideRight .meta-lightbox-wrap { .meta-lightbox-effect-slideRight .meta-lightbox-wrap {
transform: translateX(10%); transform: translateX(10%);
} }
.meta-lightbox-effect-slideLeft.meta-lightbox-open .meta-lightbox-wrap, .meta-lightbox-effect-slideLeft.meta-lightbox-open .meta-lightbox-wrap,
.meta-lightbox-effect-slideRight.meta-lightbox-open .meta-lightbox-wrap { .meta-lightbox-effect-slideRight.meta-lightbox-open .meta-lightbox-wrap {
transform: translateX(0); transform: translateX(0);
} }
.meta-lightbox-effect-slideDown .meta-lightbox-wrap { .meta-lightbox-effect-slideDown .meta-lightbox-wrap {
transform: translateY(-10%); transform: translateY(-10%);
} }
.meta-lightbox-effect-slideUp .meta-lightbox-wrap { .meta-lightbox-effect-slideUp .meta-lightbox-wrap {
transform: translateY(10%); transform: translateY(10%);
} }
.meta-lightbox-effect-slideUp.meta-lightbox-open .meta-lightbox-wrap, .meta-lightbox-effect-slideUp.meta-lightbox-open .meta-lightbox-wrap,
.meta-lightbox-effect-slideDown.meta-lightbox-open .meta-lightbox-wrap { .meta-lightbox-effect-slideDown.meta-lightbox-open .meta-lightbox-wrap {
transform: translateY(0); transform: translateY(0);
} }
/* fall */ /* fall */
.meta-lightbox-body-effect-fall .meta-lightbox-effect-fall { .meta-lightbox-body-effect-fall .meta-lightbox-effect-fall {
perspective: 1000px; perspective: 1000px;
}
.meta-lightbox-effect-fall .meta-lightbox-wrap {
transition: all 0.3s ease-out;
transform: translateZ(300px);
}
.meta-lightbox-effect-fall.meta-lightbox-open .meta-lightbox-wrap {
transform: translateZ(0);
} }
@import "meta-lightbox-theme"; .meta-lightbox-effect-fall .meta-lightbox-wrap {
transition: all 0.3s ease-out;
transform: translateZ(300px);
}
.meta-lightbox-effect-fall.meta-lightbox-open .meta-lightbox-wrap {
transform: translateZ(0);
}
@import "meta-lightbox-theme";