b.wxss 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. .container {
  2. display: flex;
  3. flex-direction: column;
  4. align-items: center;
  5. justify-content: center;
  6. padding: 20rpx 40rpx;
  7. height: 50vh; /* 使容器占据整个屏幕高度 */
  8. }
  9. .input {
  10. width: 100%;
  11. height: 80rpx;
  12. margin-bottom: 20rpx;
  13. padding: 0 20rpx;
  14. border: 1px solid #ddd;
  15. border-radius: var(--border-radius, 10rpx);
  16. box-sizing: border-box;
  17. }
  18. .btn {
  19. width: 100%;
  20. height: 80rpx;
  21. background-color: var(--primary-color, #1aad19);
  22. color: #fff;
  23. border: none;
  24. border-radius: var(--border-radius, 10rpx);
  25. text-align: center;
  26. line-height: 45rpx;
  27. font-size: 36rpx;
  28. box-shadow: 0 4rpx 10rpx rgba(0, 0, 0, 0.1); /* 添加阴影 */
  29. transition: background-color 0.3s ease, box-shadow 0.3s ease; /* 背景颜色和阴影过渡效果 */
  30. }
  31. .btn:active {
  32. background-color: var(--active-color, #128c13);
  33. box-shadow: 0 2rpx 5rpx rgba(0, 0, 0, 0.2); /* 按钮点击时阴影变化 */
  34. }
  35. .btn:hover {
  36. background-color: var(--hover-color, #16b818);
  37. cursor: pointer; /* 鼠标悬浮时显示手型 */
  38. }
  39. .error {
  40. color: red;
  41. margin-top: 10rpx;
  42. animation: fadeIn 0.5s ease;
  43. }
  44. @keyframes fadeIn {
  45. from {
  46. opacity: 0;
  47. }
  48. to {
  49. opacity: 1;
  50. }
  51. }
  52. .avatar {
  53. width: 150rpx;
  54. height: 150rpx;
  55. border-radius: 50%;
  56. margin-top: 20rpx;
  57. object-fit: cover;
  58. }
  59. @media screen and (max-width: 375px) {
  60. .container {
  61. padding: 100rpx 20rpx;
  62. }
  63. .btn {
  64. font-size: 28rpx;
  65. height: 60rpx;
  66. line-height: 60rpx;
  67. }
  68. .input {
  69. height: 60rpx;
  70. }
  71. }
  72. /* pages/demo/demo.wxss */
  73. .root {
  74. display: flex;
  75. justify-content: center;
  76. align-items: center;
  77. flex-direction: column;
  78. }
  79. .touxiang {
  80. width: 300rpx;
  81. height: 300rpx;
  82. border-radius: 50%;
  83. margin-top: 30rpx;
  84. }
  85. .name {
  86. margin-top: 30rpx;
  87. }
  88. /* 弹窗 */
  89. .pop_root {
  90. position: fixed;
  91. top: 0;
  92. right: 0;
  93. bottom: 0;
  94. left: 0;
  95. background: rgb(0, 0, 0, 0.6);
  96. z-index: 1000;
  97. }
  98. .pop_content {
  99. position: fixed;
  100. bottom: 0;
  101. left: 0;
  102. right: 0;
  103. background: white;
  104. display: flex;
  105. flex-direction: column;
  106. align-items: center;
  107. border-radius: 30rpx 30rpx 0 0;
  108. }
  109. .pot_tip {
  110. font-size: 48rpx;
  111. margin-top: 30rpx;
  112. }
  113. .pop_avatar {
  114. width: 200rpx;
  115. height: 200rpx;
  116. border-radius: 50%;
  117. background: gainsboro;
  118. font-size: 35rpx;
  119. display: flex;
  120. flex-direction: center;
  121. align-items: center;
  122. margin: 30rpx;
  123. padding: 0;
  124. }
  125. .pop_img {
  126. width: 100%;
  127. height: 100%;
  128. }
  129. .pop_name {
  130. width: 300rpx;
  131. bottom: 1px solid gray;
  132. border-radius: 25epx;
  133. padding-left: 160rpx;
  134. margin-bottom: 50rpx;
  135. }
  136. .pop_bot {
  137. display: flex;
  138. margin-bottom: 50rpx;
  139. }
  140. .btn {
  141. width: 150rpx;
  142. border: 1px solid gray;
  143. border-radius: 20rpx;
  144. text-align: center;
  145. background: red;
  146. color: white;
  147. }
  148. .btn1 {
  149. width: 150rpx;
  150. border: 1px solid gray;
  151. border-radius: 20rpx;
  152. text-align: center;
  153. background: green;
  154. color: white;
  155. margin-left: 90rpx;
  156. }