drip-ui
Version:
Lightweight Mobile UI Components built on Vue
142 lines (136 loc) • 2.63 kB
CSS
.drip-popup {
&__mark {
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
opacity: 0.5;
transition: all 0.2s ease forwards;
background: #000;
z-index: 10;
}
&--popup {
position: fixed;
background: #fff;
top: 50%;
left: 50%;
width: 750px;
transform: translate3d(-50%, -50%, 0);
backface-visibility: hidden;
transition: 0.4s ease-out;
border-radius: 40px 40px 0 0;
z-index: 10;
}
&--popup-top {
top: 0;
right: auto;
bottom: auto;
left: 50%;
transform: translate3d(-50%, 0, 0);
}
&--popup-right {
top: 50%;
right: 0;
bottom: auto;
left: auto;
transform: translate3d(0, -50%, 0);
}
&--popup-left {
top: 50%;
right: auto;
bottom: auto;
left: 0;
transform: translate3d(0, -50%, 0);
}
&--popup-bottom {
top: auto;
right: auto;
bottom: 0;
left: 50%;
transform: translate3d(-50%, 0, 0);
}
&--content {
overflow-y: scroll;
transition: 0.4s ease-out;
}
&--content-submit {
padding-bottom: 150px;
}
&__header {
width: 100%;
}
&__picker-title {
display: flex;
min-height: 120px;
padding: 30px 40px;
font-size: 28px;
position: relative;
width: 100%;
box-sizing: border-box;
&-border-bottom {
&:after {
content: "";
position: absolute;
left: 0;
bottom: 0;
width: 100%;
border-bottom: 1px solid #ddd;
color: #ddd;
transform-origin: 0 100%;
transform: scaleY(0.5);
}
}
}
&__title {
color: #333;
text-align: center;
font-size: 36px;
}
&__sub-title {
display: block;
color: #848484;
text-align: left;
font-size: 26px;
line-height: 50px;
}
&__cancel-button {
position: absolute;
right: 40px;
top: 40px;
img {
width: 40px;
height: 40px;
}
}
&__submit-footer {
position: fixed;
bottom: 0;
width: 750px;
height: 200px;
padding: 50px 0;
box-sizing: border-box;
background: rgba(255, 255, 255, 0.3);
text-align: center;
}
}
.popup-slide-top-enter,
.popup-slide-top-leave-active {
transform: translate3d(-50%, -100%, 0);
}
.popup-slide-right-enter,
.popup-slide-right-leave-active {
transform: translate3d(100%, -50%, 0);
}
.popup-slide-bottom-enter,
.popup-slide-bottom-leave-active {
transform: translate3d(-50%, 100%, 0);
}
.popup-slide-left-enter,
.popup-slide-left-leave-active {
transform: translate3d(-100%, -50%, 0);
}
.popup-fade-enter,
.popup-fade-leave-active {
opacity: 0;
}