/* app.wxss - 全局样式 */ /* 引入 Vant Weapp 样式 */ @import './miniprogram_npm/@vant/weapp/common/index.wxss'; /* CSS 变量定义 */ page { --primary-color: #1890ff; --success-color: #52c41a; --warning-color: #faad14; --danger-color: #ff4d4f; --text-color: #333333; --text-color-secondary: #666666; --text-color-placeholder: #999999; --border-color: #e8e8e8; --background-color: #f5f5f5; --white: #ffffff; font-size: 28rpx; color: var(--text-color); background-color: var(--background-color); box-sizing: border-box; } /* 通用布局 */ .container { min-height: 100vh; background-color: var(--background-color); } .flex { display: flex; } .flex-column { display: flex; flex-direction: column; } .flex-center { display: flex; justify-content: center; align-items: center; } .flex-between { display: flex; justify-content: space-between; align-items: center; } .flex-wrap { flex-wrap: wrap; } .flex-1 { flex: 1; } /* 间距 */ .mt-10 { margin-top: 10rpx; } .mt-20 { margin-top: 20rpx; } .mt-30 { margin-top: 30rpx; } .mb-10 { margin-bottom: 10rpx; } .mb-20 { margin-bottom: 20rpx; } .mb-30 { margin-bottom: 30rpx; } .ml-10 { margin-left: 10rpx; } .mr-10 { margin-right: 10rpx; } .p-20 { padding: 20rpx; } .p-30 { padding: 30rpx; } /* 文字 */ .text-center { text-align: center; } .text-primary { color: var(--primary-color); } .text-secondary { color: var(--text-color-secondary); } .text-placeholder { color: var(--text-color-placeholder); } .text-bold { font-weight: bold; } .text-sm { font-size: 24rpx; } .text-lg { font-size: 32rpx; } .text-xl { font-size: 36rpx; } /* 单行省略 */ .ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* 多行省略 */ .ellipsis-2 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; } /* 卡片样式 */ .card { background-color: var(--white); border-radius: 16rpx; padding: 24rpx; margin: 20rpx; box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.05); } /* 分割线 */ .divider { height: 1rpx; background-color: var(--border-color); margin: 20rpx 0; } /* 安全区域 */ .safe-area-bottom { padding-bottom: constant(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom); }