130 lines
2.1 KiB
Plaintext

@import '../common/style/var.less';
.van-popup {
position: fixed;
top: 50%;
left: 50%;
max-height: 100%;
overflow-y: auto;
background-color: @white;
box-sizing: border-box;
animation: ease both;
-webkit-overflow-scrolling: touch;
transition-timing-function: ease;
&--center {
transform: translate3d(-50%, -50%, 0);
}
&--top {
top: 0;
right: auto;
bottom: auto;
left: 50%;
width: 100%;
transform: translate3d(-50%, 0, 0);
}
&--right {
top: 50%;
right: 0;
bottom: auto;
left: auto;
transform: translate3d(0, -50%, 0);
}
&--bottom {
top: auto;
right: auto;
bottom: 0;
left: 50%;
width: 100%;
transform: translate3d(-50%, 0, 0);
}
&--left {
top: 50%;
right: auto;
bottom: auto;
left: 0;
transform: translate3d(0, -50%, 0);
}
&--bottom&--safe {
padding-bottom: @safe-area-inset-bottom;
}
&--left &__safe-top,
&--right &__safe-top,
&--top &__safe-top {
height: @nav-bar-height;
}
&--center &__safe-top,
&--bottom &__safe-top {
padding-top: 0 !important;
}
}
.van-scale-enter-active,
.van-scale-leave-active {
transition-property: opacity, transform;
}
.van-scale-enter,
.van-scale-leave-to {
opacity: 0;
transform: translate3d(-50%, -50%, 0) scale(0.7);
}
.van-fade-enter-active,
.van-fade-leave-active {
transition-property: opacity;
}
.van-fade-enter,
.van-fade-leave-to {
opacity: 0;
}
.van-center-enter-active,
.van-center-leave-active {
transition-property: opacity;
}
.van-center-enter,
.van-center-leave-to {
opacity: 0;
}
.van-bottom-enter-active,
.van-bottom-leave-active,
.van-top-enter-active,
.van-top-leave-active,
.van-left-enter-active,
.van-left-leave-active,
.van-right-enter-active,
.van-right-leave-active {
transition-property: transform;
}
.van-bottom-enter,
.van-bottom-leave-to {
transform: translate3d(-50%, 100%, 0);
}
.van-top-enter,
.van-top-leave-to {
transform: translate3d(-50%, -100%, 0);
}
.van-left-enter,
.van-left-leave-to {
transform: translate3d(-100%, -50%, 0);
}
.van-right-enter,
.van-right-leave-to {
transform: translate3d(100%, -50%, 0);
}