searchInput.wxss
1.17 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/* components/searchInput/searchInput.wxss */
.search-input {
position: relative;
float: left;
width: 100%;
height: 40rpx;
box-sizing: border-box;
}
.w90 {
width: 100%;
}
.search-input .search {
position: absolute;
top: 50%;
left: 0;
transform: translateY(-50%);
height: 100%;
font-size: 24rpx;
color: #999;
line-height: 40rpx;
display: flex;
align-items: center;
}
.search-input .search .image {
width: 32rpx;
height: 32rpx;
margin-right: 7rpx;
}
.search-input .input {
height: 100%;
width: 100%;
box-sizing: border-box;
font-size: 28rpx;
}
.w90 .search {
display: none;
}
.w90 .input {
width: calc(100% - 57rpx);
color: #333;
}
.w90 .clear {
position: absolute;
width: 57rpx;
height: 40rpx;
top: 0;
right: 0;
}
.w90 .clear .image {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 28rpx;
height: 28rpx;
}
.w90~.search-cancel{
display: block;
}
.search-cancel {
display: none;
float: left;
width: 10%;
height: 40rpx;
line-height: 40rpx;
font-size: 24rpx;
color: #666;
text-align: right;
}