wangzhibo
4 天以前 10595d8632f959d0954d1939243196f4eed02372
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
.cl-popup__wrapper {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    opacity: 0;
    transition: all 0.3s;
    pointer-events: none;
 
    &.is-open {
        pointer-events: auto;
        opacity: 1;
 
        .cl-popup {
            transition: all 0.4s;
            transform: translate(0, 0);
        }
    }
 
    &::after {
        content: "";
        display: inline-block;
        height: 100%;
        width: 0;
        vertical-align: middle;
    }
 
    .cl-popup__modal {
        height: 100%;
        width: 100%;
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
    }
 
    .cl-popup {
        background-color: #fff;
        position: absolute;
        transition: all 0.3s;
        box-sizing: border-box;
 
        &__header {
            display: flex;
            align-items: center;
            justify-content: center;
            line-height: 1;
            font-size: 30rpx;
            height: 90rpx;
            letter-spacing: 1rpx;
            font-weight: 500;
        }
 
        &__container {
            height: 100%;
            box-sizing: border-box;
        }
 
        &__close {
            position: absolute;
            top: 26rpx;
            right: 26rpx;
            font-size: 38rpx;
            line-height: 1;
        }
    }
 
    &--left {
        .cl-popup {
            transform: translateX(-100%);
            top: 0;
            left: 0;
        }
    }
 
    &--right {
        .cl-popup {
            transform: translateX(100%);
            right: 0;
            top: 0;
        }
    }
 
    &--top {
        .cl-popup {
            transform: translateY(-100%);
            left: 0;
            top: 0;
        }
    }
 
    &--bottom {
        .cl-popup {
            transform: translateY(100%);
            left: 0;
            bottom: 0;
        }
    }
 
    &--center {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
 
        .cl-popup {
            transform: scale(1.3);
        }
    }
 
    &--left,
    &--right,
    &--bottom {
        .cl-popup {
            padding-bottom: env(safe-area-inset-bottom);
        }
    }
}