homepage.wxss 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. /* pages/homepage/homepage.wxss */
  2. .container {
  3. min-height: 100vh;
  4. background-color: #f5f7fa;
  5. padding-bottom: 120rpx;
  6. }
  7. .header {
  8. position: relative;
  9. width: 100%;
  10. height: 320rpx;
  11. margin-top: -32rpx;
  12. }
  13. .background {
  14. position: absolute;
  15. top: 0;
  16. left: 0;
  17. width: 100%;
  18. height: 100%;
  19. }
  20. .logo {
  21. position: absolute;
  22. left: 32rpx;
  23. bottom: 80rpx;
  24. width: 280rpx;
  25. height: 90rpx;
  26. z-index: 2;
  27. }
  28. .welcome-card {
  29. position: absolute;
  30. left: 2%; /* 使用百分比替代固定像素 */
  31. top: 128px; /* 顶部距离可以保持固定,或根据需要调整 */
  32. width: 96%; /* 宽度占父容器的 96%,留出左右 2% 的边距 */
  33. height: 188px; /* 高度可以根据需要调整 */
  34. opacity: 1;
  35. background-color: #fff;
  36. border-radius: 8px; /* 圆角 */
  37. box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  38. overflow: hidden;
  39. }
  40. .card-bg {
  41. position: absolute;
  42. width: 105%; /* 宽度超出 .welcome-card 的 5%,实现覆盖效果 */
  43. left: -2.5%; /* 向左偏移 2.5%,使背景居中 */
  44. height: 100%; /* 高度与 .welcome-card 一致 */
  45. opacity: 1;
  46. background-color: #f0f0f0; /* 背景色 */
  47. border-radius: 8px; /* 圆角 */
  48. }
  49. .card-content {
  50. position: relative;
  51. padding: 40rpx 32rpx;
  52. z-index: 2;
  53. }
  54. .title {
  55. font-size: 36rpx;
  56. font-weight: 500;
  57. color: #333;
  58. margin-bottom: 12rpx;
  59. }
  60. .subtitle {
  61. font-size: 26rpx;
  62. color: #999;
  63. margin-bottom: 32rpx;
  64. letter-spacing: 4rpx;
  65. }
  66. .bind-button {
  67. width: 200rpx !important;
  68. height: 80rpx;
  69. line-height: 80rpx;
  70. background: #4080FF;
  71. color: #fff;
  72. font-size: 30rpx;
  73. border-radius: 40rpx;
  74. padding: 0;
  75. }
  76. .bind-button::after {
  77. border: none;
  78. }
  79. .notice-list {
  80. margin: 32rpx;
  81. color: #666;
  82. }
  83. .notice-item {
  84. font-size: 26rpx;
  85. line-height: 1.8;
  86. margin-bottom: 16rpx;
  87. color: #999;
  88. }
  89. .tab-bar {
  90. position: fixed;
  91. bottom: 0;
  92. width: 100%;
  93. height: 100rpx;
  94. background: #fff;
  95. display: flex;
  96. padding-bottom: env(safe-area-inset-bottom);
  97. border-top: 1rpx solid #eee;
  98. }
  99. .tab-item {
  100. flex: 1;
  101. display: flex;
  102. flex-direction: column;
  103. align-items: center;
  104. justify-content: center;
  105. font-size: 24rpx;
  106. color: #999;
  107. }
  108. .tab-item.active {
  109. color: #4080FF;
  110. }