mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
95 lines
1.5 KiB
Plaintext
95 lines
1.5 KiB
Plaintext
@import '../common/index.pcss';
|
|
|
|
.van-popup {
|
|
top: 50%;
|
|
left: 50%;
|
|
z-index: 11;
|
|
max-height: 100%;
|
|
overflow-y: auto;
|
|
box-sizing: border-box;
|
|
background-color: $white;
|
|
-webkit-overflow-scrolling: touch;
|
|
transform: translate3d(-50%, -50%, 0);
|
|
|
|
&,
|
|
&__overlay {
|
|
display: none;
|
|
position: fixed;
|
|
animation: van-fade-in .3s ease;
|
|
}
|
|
|
|
&__overlay {
|
|
width: 100%;
|
|
height: 100%;
|
|
top: 0;
|
|
left: 0;
|
|
z-index: 10;
|
|
background-color: rgba(0, 0, 0, 0.7);
|
|
}
|
|
|
|
&--top {
|
|
width: 100%;
|
|
top: 0;
|
|
right: auto;
|
|
bottom: auto;
|
|
left: 50%;
|
|
transform: translate3d(-50%, 0, 0);
|
|
animation-name: van-popup-top;
|
|
}
|
|
|
|
&--right {
|
|
top: 50%;
|
|
right: 0;
|
|
bottom: auto;
|
|
left: auto;
|
|
transform: translate3d(0, -50%, 0);
|
|
animation-name: van-popup-right;
|
|
}
|
|
|
|
&--bottom {
|
|
width: 100%;
|
|
top: auto;
|
|
bottom: 0;
|
|
right: auto;
|
|
left: 50%;
|
|
transform: translate3d(-50%, 0, 0);
|
|
animation-name: van-popup-bottom;
|
|
}
|
|
|
|
&--left {
|
|
top: 50%;
|
|
right: auto;
|
|
bottom: auto;
|
|
left: 0;
|
|
transform: translate3d(0, -50%, 0);
|
|
animation-name: van-popup-left;
|
|
}
|
|
|
|
&--show {
|
|
display: block;
|
|
}
|
|
}
|
|
|
|
@keyframes van-popup-top {
|
|
from {
|
|
transform: translate3d(-50%, -100%, 0);
|
|
}
|
|
}
|
|
|
|
@keyframes van-popup-bottom {
|
|
from {
|
|
transform: translate3d(-50%, 100%, 0);
|
|
}
|
|
}
|
|
|
|
@keyframes van-popup-left {
|
|
from {
|
|
transform: translate3d(-100%, -50%, 0);
|
|
}
|
|
}
|
|
|
|
@keyframes van-popup-right {
|
|
from {
|
|
transform: translate3d(100%, -50%, 0);
|
|
}
|
|
} |