| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382 |
- /* 小程序登录页样式 - 符合16-mini-program-ui.md规范 */
- /* 1. 设计原则 - 简洁直观、一致性、响应迅速、易用性 */
- /* 页面容器 - 使用品牌主色渐变背景 */
- .login-container {
- min-height: 100vh;
- background: linear-gradient(180deg, #1890ff 0%, #096dd9 100%);
- padding: 64rpx 32rpx;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- box-sizing: border-box;
- position: relative;
- overflow: hidden;
- }
- /* 背景装饰 - 符合简洁原则 */
- .login-container::before {
- content: '';
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background: url('https://source.unsplash.com/800x1200/?abstract,blue,light') center/cover;
- opacity: 0.1;
- filter: blur(2rpx);
- }
- /* 2. 视觉规范 - 色彩系统 */
- /* 主色调应用 */
- .login-header {
- text-align: center;
- margin-bottom: 96rpx;
- position: relative;
- z-index: 1;
- }
- /* Logo样式 - 符合图标规范 */
- .login-logo {
- width: 160rpx;
- height: 160rpx;
- border-radius: 50%;
- margin-bottom: 48rpx;
- box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.12);
- border: 4rpx solid rgba(255, 255, 255, 0.3);
- background: #ffffff;
- }
- /* 标题样式 - 符合字体规范 */
- .login-title-container {
- margin-top: 32rpx;
- }
- .login-title {
- display: block;
- font-size: 48rpx;
- font-weight: 600;
- color: #ffffff;
- margin-bottom: 16rpx;
- letter-spacing: 1rpx;
- line-height: 1.3;
- }
- .login-subtitle {
- display: block;
- font-size: 32rpx;
- color: rgba(255, 255, 255, 0.85);
- line-height: 1.5;
- font-weight: 400;
- }
- /* 3. 组件规范 - 卡片样式 */
- /* 表单区域 - 使用卡片规范 */
- .login-form {
- width: 100%;
- max-width: 640rpx;
- background: #ffffff;
- border-radius: 24rpx;
- padding: 64rpx 48rpx;
- box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.08);
- position: relative;
- z-index: 1;
- }
- /* 表单间距 - 符合间距规范 */
- .form-item {
- margin-bottom: 48rpx;
- }
- .form-label {
- display: block;
- font-size: 32rpx;
- color: #262626;
- margin-bottom: 16rpx;
- font-weight: 500;
- }
- /* 输入框样式 - 符合输入框规范 */
- .input-wrapper {
- position: relative;
- }
- .form-input {
- width: 100%;
- height: 96rpx;
- border: 2rpx solid #d9d9d9;
- border-radius: 12rpx;
- padding: 0 32rpx;
- font-size: 32rpx;
- color: #262626;
- box-sizing: border-box;
- background: #fafafa;
- transition: all 0.2s ease;
- }
- .form-input:focus {
- border-color: #1890ff;
- background: #ffffff;
- box-shadow: 0 0 0 4rpx rgba(24, 144, 255, 0.2);
- }
- .form-input::placeholder {
- color: #8c8c8c;
- font-size: 32rpx;
- }
- /* 4. 按钮规范 - 主要按钮样式 */
- .login-button {
- width: 100%;
- height: 96rpx;
- background: #1890ff;
- color: #ffffff;
- border-radius: 12rpx;
- font-size: 36rpx;
- font-weight: 500;
- margin-top: 64rpx;
- transition: all 0.2s ease;
- box-shadow: 0 4rpx 16rpx rgba(24, 144, 255, 0.3);
- position: relative;
- overflow: hidden;
- }
- .login-button:active {
- transform: scale(0.98);
- box-shadow: 0 2rpx 8rpx rgba(24, 144, 255, 0.2);
- }
- .login-button.loading {
- opacity: 0.7;
- transform: scale(0.98);
- }
- .login-button:disabled {
- background: #bfbfbf;
- color: #ffffff;
- box-shadow: none;
- }
- /* 5. 页脚样式 */
- .login-footer {
- text-align: center;
- margin-top: 48rpx;
- }
- .footer-text {
- font-size: 32rpx;
- color: rgba(255, 255, 255, 0.9);
- font-weight: 400;
- }
- .link-text {
- color: #ffffff;
- font-size: 32rpx;
- font-weight: 500;
- text-decoration: underline;
- }
- .link-text:active {
- opacity: 0.8;
- }
- .login-footer-info {
- position: absolute;
- bottom: 48rpx;
- left: 0;
- right: 0;
- text-align: center;
- }
- .footer-tip {
- font-size: 28rpx;
- color: rgba(255, 255, 255, 0.7);
- margin-bottom: 8rpx;
- font-weight: 400;
- }
- .footer-links {
- display: flex;
- justify-content: center;
- align-items: center;
- gap: 16rpx;
- flex-wrap: wrap;
- }
- .link-separator {
- color: rgba(255, 255, 255, 0.7);
- font-size: 28rpx;
- }
- /* 6. 响应式设计 - 适配不同屏幕 */
- @media screen and (max-width: 375px) {
- .login-container {
- padding: 48rpx 24rpx;
- }
-
- .login-form {
- padding: 48rpx 32rpx;
- }
-
- .login-title {
- font-size: 42rpx;
- }
-
- .login-subtitle {
- font-size: 28rpx;
- }
-
- .login-logo {
- width: 128rpx;
- height: 128rpx;
- }
- }
- @media screen and (min-width: 415px) {
- .login-container {
- padding: 96rpx 48rpx;
- }
-
- .login-form {
- padding: 80rpx 64rpx;
- }
- }
- /* 7. 深色模式适配 */
- @media (prefers-color-scheme: dark) {
- .login-container {
- background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
- }
-
- .login-title {
- color: #e6e6e6;
- }
-
- .login-subtitle {
- color: rgba(230, 230, 230, 0.85);
- }
-
- .login-form {
- background: #2a2a2a;
- box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.3);
- }
-
- .form-label {
- color: #e6e6e6;
- }
-
- .form-input {
- background: #3a3a3a;
- border-color: #595959;
- color: #e6e6e6;
- }
-
- .form-input:focus {
- border-color: #1890ff;
- background: #4a4a4a;
- }
-
- .footer-text {
- color: rgba(230, 230, 230, 0.9);
- }
-
- .link-text {
- color: #1890ff;
- }
-
- .footer-tip,
- .link-separator {
- color: rgba(230, 230, 230, 0.7);
- }
- }
- /* 8. 动效规范 - 过渡动画 */
- @keyframes fadeInUp {
- from {
- opacity: 0;
- transform: translateY(64rpx);
- }
- to {
- opacity: 1;
- transform: translateY(0);
- }
- }
- @keyframes fadeIn {
- from {
- opacity: 0;
- }
- to {
- opacity: 1;
- }
- }
- .login-header {
- animation: fadeIn 0.6s ease-out;
- }
- .login-form {
- animation: fadeInUp 0.8s ease-out;
- }
- .login-button {
- animation: fadeInUp 1s ease-out;
- }
- /* 9. 触摸反馈 - 微交互 */
- .form-item {
- transition: transform 0.2s ease;
- }
- .form-item:active {
- transform: scale(0.99);
- }
- /* 10. 安全区域适配 */
- @supports (padding-top: constant(safe-area-inset-top)) {
- .login-container {
- padding-top: calc(64rpx + constant(safe-area-inset-top));
- }
- }
- @supports (padding-top: env(safe-area-inset-top)) {
- .login-container {
- padding-top: calc(64rpx + env(safe-area-inset-top));
- }
- }
- @supports (padding-bottom: constant(safe-area-inset-bottom)) {
- .login-container {
- padding-bottom: calc(64rpx + constant(safe-area-inset-bottom));
- }
- }
- @supports (padding-bottom: env(safe-area-inset-bottom)) {
- .login-container {
- padding-bottom: calc(64rpx + env(safe-area-inset-bottom));
- }
- }
- /* 11. 辅助样式 */
- .hidden {
- display: none;
- }
- .loading-skeleton {
- background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
- background-size: 200% 100%;
- animation: loading 1.5s infinite;
- }
- @keyframes loading {
- 0% {
- background-position: 200% 0;
- }
- 100% {
- background-position: -200% 0;
- }
- }
|