toolbox.page.scss 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. /* 全局样式 */
  2. ion-app {
  3. background: url('/assets/images/background-image.jpg') no-repeat center center fixed;
  4. /* 添加背景图片 */
  5. background-size: cover;
  6. /* 背景图片覆盖整个内容区域 */
  7. background-position: center;
  8. /* 背景图片居中 */
  9. height: 100vh;
  10. /* 确保背景覆盖整个视口高度 */
  11. margin: 0;
  12. /* 移除默认的外边距 */
  13. padding: 0;
  14. /* 移除默认的内边距 */
  15. }
  16. ion-content {
  17. --background: transparent;
  18. /* 设置为透明,以便背景从 ion-app 继承 */
  19. padding: 16px;
  20. }
  21. /* 卡片样式 */
  22. ion-card {
  23. margin-bottom: 16px;
  24. border-radius: 8px;
  25. box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  26. /* 默认阴影 */
  27. background-size: cover;
  28. /* 背景图片覆盖整个卡片 */
  29. background-position: center;
  30. /* 背景图片居中 */
  31. transition: box-shadow 0.3s ease, transform 0.3s ease;
  32. /* 添加过渡效果 */
  33. }
  34. ion-content ion-card:hover {
  35. box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
  36. /* 调整阴影强度和模糊半径 */
  37. transform: translateY(-12px);
  38. /* 增加提升高度 */
  39. }
  40. /* 卡片标题样式 */
  41. ion-card-title {
  42. color: #ffffff;
  43. font-size: 1.25rem;
  44. font-weight: bold;
  45. }
  46. /* 卡片内容样式 */
  47. ion-card-content {
  48. padding: 16px;
  49. }
  50. /* 按钮样式 */
  51. ion-button {
  52. --background: rgba(255, 255, 255, 0.5);
  53. /* 半透明白色背景 */
  54. --color: black;
  55. /* 按钮文字颜色 */
  56. --border-radius: 8px;
  57. /* 按钮圆角 */
  58. --padding-top: 12px;
  59. /* 按钮内边距 */
  60. --padding-bottom: 12px;
  61. /* 按钮内边距 */
  62. --padding-start: 24px;
  63. /* 按钮内边距 */
  64. --padding-end: 24px;
  65. /* 按钮内边距 */
  66. font-size: 1rem;
  67. font-weight: 500;
  68. }
  69. ion-button:hover {
  70. --background: rgba(255, 255, 255, 0.7);
  71. /* 鼠标悬停时稍微不那么透明 */
  72. }
  73. /* 工具栏样式 */
  74. ion-toolbar {
  75. --background: transparent;
  76. /* 设置为透明,以便背景从 ion-app 继承 */
  77. --color: #333;
  78. border-bottom: 1px solid #e0e0e0;
  79. }
  80. /* 返回按钮样式 */
  81. ion-back-button {
  82. --color: #007bff;
  83. }
  84. /* 为每个卡片添加背景图片和不同的渐变背景 */
  85. ion-card:nth-child(1) {
  86. background: linear-gradient(135deg, #fd7a59, #eaf4ba), url('/assets/images/card1.jpg');
  87. /* 渐变背景和图片背景 */
  88. background-blend-mode: multiply;
  89. /* 混合模式 */
  90. background-size: cover;
  91. /* 背景图片覆盖整个卡片 */
  92. background-position: center;
  93. /* 背景图片居中 */
  94. }
  95. ion-card:nth-child(2) {
  96. background: linear-gradient(135deg, #39a6f9, hsl(311, 73%, 87%)), url('/assets/images/card2.jpg');
  97. /* 渐变背景和图片背景 */
  98. background-blend-mode: multiply;
  99. /* 混合模式 */
  100. background-size: cover;
  101. /* 背景图片覆盖整个卡片 */
  102. background-position: center;
  103. /* 背景图片居中 */
  104. }
  105. ion-card:nth-child(3) {
  106. background: linear-gradient(135deg, #24f919, #e8f5aa), url('/assets/images/card3.jpg');
  107. /* 渐变背景和图片背景 */
  108. background-blend-mode: multiply;
  109. /* 混合模式 */
  110. background-size: cover;
  111. /* 背景图片覆盖整个卡片 */
  112. background-position: center;
  113. /* 背景图片居中 */
  114. }