switchBlock.sass
1.01 KB
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
/* components/switchBlock/switchBlock.wxss */
.switch-box {
box-sizing: border-box;
padding: 4rpx;
width: 172rpx;
height: 56rpx;
border-radius: 8rpx;
display: flex;
background: #f7f8fa;
// border: var(--fontSize2) solid #347BFF;
font-size: var(--fontSize28);
color: #999EA8;
margin-left: auto;
position: relative;
}
.text-center {
display: flex;
align-items: center;
justify-content: center;
}
.switch-box .block {
position: absolute;
top: 4rpx;
left: 4rpx;
width: 80rpx;
border-radius: 4rpx;
height: 48rpx;
background: #fff;
transition: all .25s;
}
.switch-box .block.right {
left: 50%;
}
.switch-box .male,
.switch-box .woman {
width: 80rpx;
height: 48rpx;
position: absolute;
top: 4rpx;
transition: all .25s;
color: #999EA8;
}
.switch-box .male {
left: 4rpx;
}
.switch-box .woman {
right: 4rpx;
}
.switch-box .male.active,
.switch-box .woman.active {
color: #292d33;
}
.disabled {
opacity: .5;
}