// 全局样式 // 导入 NutUI 样式(必须在其他规则之前) @use '@nutui/nutui-react-taro/dist/styles/theme-default.scss'; // TailwindCSS 指令 @tailwind base; // noinspection TailwindCssInclude @tailwind components; // noinspection TailwindCssInclude @tailwind utilities; // noinspection TailwindCssInclude // 自定义样式变量 :root { --primary-color: #1890ff; --secondary-color: #52c41a; --text-color: #333333; --bg-color: #ffffff; --border-color: #e8e8e8; } // 暗黑模式 .dark { --primary-color: #177ddc; --text-color: #ffffff; --bg-color: #141414; --border-color: #303030; background-color: var(--bg-color); color: var(--text-color); } // 全局重置样式 page { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-size: 28px; color: var(--text-color); background-color: var(--bg-color); } // 安全区域适配(小程序不支持 env(),使用固定值) .safe-area-bottom { padding-bottom: 20px; } // 通用工具类 .flex-center { display: flex; align-items: center; justify-content: center; } .flex-between { display: flex; align-items: center; justify-content: space-between; } .text-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .text-ellipsis-2 { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } // 加载旋转动画(Loading组件使用) @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }