jquery-slideoutpanel
Version:
jQuery SlideOutPanel is a jQuery Plugin to add a sliding out panel.
154 lines (131 loc) • 2.76 kB
CSS
html {
width: 100%;
}
@media all and (max-width: 768px) {
html {
width: 100% ;
}
}
html.slide-out-top {
bottom: initial ;
top: 0;
}
html.slide-out-right {
left: 0;
right: initial ;
}
html.slide-out-bottom {
bottom: 0;
top: initial ;
}
html.slide-out-left {
left: initial ;
right: 0;
}
html.slide-out-panel-static {
position: static ;
transition: none ;
width: 100% ;
}
.slide-out-panel-container {
-webkit-overflow-scrolling: touch;
background-color: #fff;
bottom: 0;
box-shadow: -3px 3px 9px rgba(0, 0, 0, 0.3);
height: auto;
max-width: 100vw;
overflow-y: auto;
position: fixed;
top: 0;
transition: top ease, right ease, bottom ease, left ease;
z-index: 9999;
}
@media all and (max-width: 768px) {
.slide-out-panel-container {
bottom: initial;
position: fixed ;
}
}
@media all and (max-width: 768px) {
.slide-out-panel-container.open {
width: 100% ;
}
}
.slide-out-panel-container * {
box-sizing: border-box;
}
.slide-out-panel-container .close-slide-out-panel {
color: #000;
cursor: pointer;
font-size: 12px;
font-weight: bold;
height: auto;
line-height: 12px;
min-height: 12px;
min-width: 12px;
opacity: .5;
position: absolute;
right: 10px;
top: 50%;
transform: translateY(-50%);
transition: opacity .35s ease;
width: auto;
z-index: 9999;
}
.slide-out-panel-container .close-slide-out-panel:hover {
font-weight: bold;
opacity: 1;
}
.slide-out-panel-container .slide-out-header,
.slide-out-panel-container .slide-out-content,
.slide-out-panel-container .slide-out-footer {
padding: 15px;
position: relative;
width: 100%;
}
.slide-out-panel-container .slide-out-header {
align-items: center;
background-color: #fff;
border: 1px solid #e5e5e5;
display: flex;
justify-content: center;
text-align: center;
}
.slide-out-panel-container .slide-out-header h4 {
margin: 0;
padding: 0;
}
.slide-out-panel-container .slide-out-content {
background-color: #fff;
}
.slide-out-panel-container .slide-out-content.no-header {
padding-top: 30px;
}
.slide-out-panel-container .slide-out-content.no-header .close-slide-out-panel {
display: block;
}
.slide-out-panel-container .slide-out-content .close-slide-out-panel {
display: none;
position: absolute;
top: 15px;
}
.slide-out-panel-container .slide-out-footer {
background-color: #fff;
}
.slide-out-panel {
display: none;
}
.slide-out-panel-screen {
height: 100vh;
left: 0;
opacity: 0;
position: fixed;
top: 0;
transition: opacity ease;
width: 100vw;
}
@media all and (max-width: 768px) {
.slide-out-panel-screen {
height: 100%;
}
}