switchBlock.wxss
1 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
/* components/switchBlock/switchBlock.wxss */
.switch-box {
width: var(--fontSize236);
height: var(--fontSize60);
display: flex;
border: var(--fontSize2) solid #347BFF;
border-radius: var(--fontSize12);
font-size: var(--fontSize28);
color: #347BFF;
margin-left: auto;
position: relative;
}
.text-center {
display: flex;
align-items: center;
justify-content: center;
}
.switch-box .block {
position: absolute;
top: 0;
left: 0;
width: 50%;
border-radius: var(--fontSize12);
height: 100%;
background: #347BFF;
color: #fff;
transition: all .25s;
}
.switch-box .block.right {
left: 50%;
}
.switch-box .male,
.switch-box .woman {
width: 50%;
height: 100%;
position: absolute;
top: 0;
transition: all .25s;
}
.switch-box .male {
left: 0;
}
.switch-box .woman {
right: 0;
}
.switch-box .male.active,
.switch-box .woman.active{
color: #fff;
}
.disabled{
opacity: .5;
}