index.less
1.65 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
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
/**
* 捡个电驴首页样式
*/
/* 搜索框样式 */
// .nut-input {
// --nut-input-border-radius: 9999px;
// --nut-input-padding: 8px 16px 8px 40px;
// --nut-input-font-size: 14px;
// --nut-input-background-color: #ffffff;
// --nut-input-border-color: transparent;
// }
.nut-searchbar__search-input .nut-searchbar__iptleft-search-icon {
margin-right: 15rpx;
}
.nut-searchbar__search-input .nut-searchbar__input-inner .h5-input {
padding-top: 10rpx;
color: gray;
}
/* 网格布局修复 */
.grid {
display: grid;
}
.grid-cols-2 {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
/* 间距修复 */
.gap-3 {
gap: 12px;
}
.space-x-1 > * + * {
margin-left: 4px;
}
/* 阴影效果 */
.shadow-sm {
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
/* 图片样式 */
image {
display: block;
width: 100%;
height: 100%;
}
/* 文本省略 */
.text-ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* 多行文本省略 */
.line-clamp-2 {
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
/* 修复flex布局在小程序中的问题 */
.flex {
display: flex;
}
.flex-col {
flex-direction: column;
}
.items-center {
align-items: center;
}
.justify-center {
justify-content: center;
}
.justify-between {
justify-content: space-between;
}
.justify-around {
justify-content: space-around;
}
/* 响应式图片 */
.aspect-fill {
object-fit: cover;
}
/* 卡片悬停效果 */
.card-hover {
transition: transform 0.2s ease-in-out;
}
.card-hover:active {
transform: scale(0.98);
}