jquery-goodpopup
Version:
Responsive jQuery popup that just works as expected. Even in IE8.
113 lines (110 loc) • 2.65 kB
CSS
@charset "UTF-8";
html.noscroll,
html.noscroll body {
overflow: hidden;
touch-action: none;
-webkit-touch-callout: none;
pointer-events: none;
}
.goodpopup {
position: fixed;
top: 0;
bottom: 100%;
left: 0;
right: 0;
margin: 0 auto;
text-align: center;
overflow: hidden;
z-index: 9;
opacity: 0;
transition: opacity 0.25s ease, bottom 0.25s linear 0.25s;
-webkit-overflow-scrolling: touch;
touch-action: auto;
-webkit-touch-callout: default;
pointer-events: auto;
}
.goodpopup_visible {
bottom: 0;
opacity: 1;
transition: opacity 0.25s ease;
}
.goodpopup:before {
content: '';
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: #000;
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAMAAAAoyzS7AAAAA1BMVEUAAACnej3aAAAAAXRSTlPM0jRW/QAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=) repeat 0 0\9; /* IE8 */
opacity: 0.8;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.goodpopup-inner {
height: 100%;
text-align: center;
position: relative;
overflow: hidden;
white-space: nowrap;
}
.goodpopup_visible .goodpopup-inner {
overflow-y: auto;
}
.goodpopup-inner:after {
content: '';
display: inline-block;
vertical-align: middle;
height: 100%;
}
.goodpopup-inner-content {
display: inline-block;
vertical-align: middle;
width: 100%;
position: relative;
white-space: normal;
opacity: 0;
transform: scale(0.7);
transition: opacity 0.25s ease, transform 0.25s ease;
}
.goodpopup_visible .goodpopup-inner-content {
opacity: 1;
transform: scale(1);
transition: opacity 0.25s ease, transform 0.25s ease;
}
.goodpopup-inner-content-element {
display: inline-block;
vertical-align: top;
max-width: 100%;
position: relative;
opacity: 1;
transform: scale(1);
transition: opacity 0.25s ease, transform 0.25s ease;
}
.goodpopup-inner-content-element_fullwidth {
display: block;
max-width: none;
}
.goodpopup-inner-content-element_hidden {
opacity: 0;
transform: scale(0.7);
}
.goodpopup-inner-content-element_hiddenfull {
position: absolute;
top: -99999px;
left: -99999px;
z-index: -1;
}
.goodpopup-inner-content-element_pseudohidden {
opacity: 0;
transform: scale(0.7);
transition: none;
}
.goodpopup-inner-content_destroyed,
.goodpopup_visible .goodpopup-inner-content_destroyed {
opacity: 0;
transform: scale(0.7);
transition: opacity 0.25s ease, transform 0.25s ease;
}