edit-profile.page.scss 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /* 定义颜色变量 */
  2. :root {
  3. --ion-color-primary: #3880ff;
  4. --ion-color-light: #ffffff;
  5. --ion-color-medium: #555555;
  6. --ion-color-primary-dark: #2f6fad; /* 更深的主色调,用于 hover 状态 */
  7. }
  8. /* 生日输入项样式 */
  9. .datetime-input-item {
  10. display: flex;
  11. align-items: center; /* 垂直居中对齐 */
  12. justify-content: space-between; /* 左右分布 */
  13. width: 100%; /* 确保整个容器占据全部宽度 */
  14. }
  15. .datetime-container {
  16. margin-left: auto; /* 强制日期选择器靠右 */
  17. display: flex;
  18. align-items: center;
  19. }
  20. /* 错误信息样式 */
  21. .datetime-error {
  22. color: red;
  23. margin-top: 4px;
  24. }
  25. /* 文件输入项样式 */
  26. .file-input-item {
  27. display: flex;
  28. align-items: center; /* 垂直居中对齐 */
  29. justify-content: space-between; /* 左右分布 */
  30. width: 100%; /* 确保整个容器占据全部宽度 */
  31. }
  32. .file-input-container {
  33. display: flex;
  34. align-items: center;
  35. width: 100%; /* 确保容器占据全部宽度 */
  36. }
  37. .button-wrapper {
  38. margin-left: auto; /* 强制按钮靠右 */
  39. }
  40. .custom-file-button-wrapper {
  41. position: relative;
  42. }
  43. .custom-file-button {
  44. padding: 12px 24px;
  45. background-color: var(--ion-color-primary);
  46. color: var(--ion-color-light);
  47. border: none;
  48. border-radius: 4px;
  49. font-size: 16px;
  50. cursor: pointer;
  51. text-align: center;
  52. transition: background-color 0.3s ease; /* 添加过渡效果 */
  53. &:hover {
  54. background-color: var(--ion-color-primary-dark); /* 使用预先定义的深色变量 */
  55. }
  56. &:active {
  57. background-color: var(--ion-color-primary-darker); /* 更深的颜色表示按下状态 */
  58. }
  59. &:focus {
  60. outline: none;
  61. box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
  62. }
  63. &.disabled {
  64. opacity: 0.5;
  65. cursor: not-allowed;
  66. }
  67. }
  68. .custom-file-label {
  69. margin-top: 8px;
  70. color: var(--ion-color-medium);
  71. font-size: 14px;
  72. text-align: right; /* 对齐到右侧 */
  73. }
  74. .avatar-label {
  75. font-size: 1.3em; /* 增大字体大小 */
  76. margin-right: 16px; /* 给标签添加一些右边距 */
  77. }
  78. /* 图片预览样式 */
  79. .preview-image-container {
  80. margin-top: 8px;
  81. }
  82. .preview-image {
  83. max-width: 100%;
  84. border-radius: 8px;
  85. }