/**app.wxss**/ /* 引入UI配置文件 */ @import './utils/ui-config.wxss'; /* 全局样式变量 */ page { --primary-color: #FF5F15; --primary-color-light: #FFF0E8; --primary-color-dark: #E54600; --primary-gradient: linear-gradient(135deg, #FF7A3D 0%, #FF5F15 100%); --secondary-color: #07C160; --secondary-color-light: #E8F8F0; --gray-1: #f8f8f8; --gray-2: #f2f2f2; --gray-3: #e7e7e7; --gray-4: #dcdcdc; --gray-5: #c6c6c6; --gray-6: #a6a6a6; --gray-7: #8b8b8b; --gray-8: #666666; --gray-9: #444444; --gray-10: #333333; --font-size-xs: 20rpx; --font-size-sm: 24rpx; --font-size-base: 28rpx; --font-size-md: 32rpx; --font-size-lg: 36rpx; --font-size-xl: 40rpx; --radius-small: 6rpx; --radius-default: 12rpx; --radius-large: 20rpx; --radius-round: 999rpx; --shadow-1: 0 2rpx 10rpx 0 rgba(0, 0, 0, 0.05); --shadow-2: 0 4rpx 20rpx 0 rgba(0, 0, 0, 0.08); --shadow-3: 0 6rpx 30rpx 0 rgba(0, 0, 0, 0.10); --transition-base: all 0.3s ease; /* 为所有页面添加底部padding,避免内容被底部标签栏遮挡 */ padding-bottom: 120rpx; } /* 全局按钮样式优化 */ .t-button { position: relative; overflow: hidden; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 2rpx 8rpx 0 rgba(0, 0, 0, 0.05); } /* 主题色按钮样式优化 */ .t-button--primary { background: var(--primary-gradient) !important; border: none !important; color: #fff !important; } .t-button--primary.t-button--hover { opacity: 0.9; transform: translateY(2rpx); box-shadow: 0 1rpx 3rpx 0 rgba(0, 0, 0, 0.08); } /* 轮廓按钮样式优化 */ .t-button--outline.t-button--primary { background: transparent !important; border: 2rpx solid var(--primary-color) !important; color: var(--primary-color) !important; } .t-button--outline.t-button--primary.t-button--hover { background: var(--primary-color-light) !important; transform: translateY(2rpx); } /* 圆角按钮样式 */ .t-button--round { border-radius: var(--radius-round) !important; } /* 卡片样式优化 */ .card { background-color: #fff; border-radius: var(--radius-default); padding: 30rpx; margin-bottom: 20rpx; box-shadow: var(--shadow-1); transition: var(--transition-base); } .card:active { transform: scale(0.98); box-shadow: var(--shadow-2); } /* 渐变背景和平滑过渡 */ .gradient-bg { background: var(--primary-gradient); color: #fff; } /* 图片平滑处理 */ image { will-change: transform; transition: transform 0.3s ease; } /* 列表项平滑过渡 */ .list-item { transition: var(--transition-base); } .list-item:active { background-color: var(--gray-1); } /* 标签栏优化 */ .t-tab-bar { box-shadow: 0 -2rpx 10rpx 0 rgba(0, 0, 0, 0.05); } /* 导航栏优化 */ .navigation-bar { background: #fff; box-shadow: 0 2rpx 10rpx 0 rgba(0, 0, 0, 0.05); } /* 平滑滚动 */ scroll-view { scroll-behavior: smooth; } /* 文本渐变效果 */ .text-gradient { background: var(--primary-gradient); -webkit-background-clip: text; color: transparent; } /* 按钮涟漪效果 */ .ripple { position: relative; overflow: hidden; } .ripple::after { content: ""; display: block; position: absolute; width: 100%; height: 100%; top: 0; left: 0; pointer-events: none; background-image: radial-gradient(circle, #fff 10%, transparent 10.01%); background-repeat: no-repeat; background-position: 50%; transform: scale(10, 10); opacity: 0; transition: transform 0.5s, opacity 0.8s; } .ripple:active::after { transform: scale(0, 0); opacity: 0.3; transition: 0s; }