tab1.page_20241217171209.scss 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /* 设置页面背景色 */
  2. ion-content {
  3. --background: #f9f9f9; /* 设置内容背景色 */
  4. }
  5. /* 设置卡片的样式 */
  6. ion-card {
  7. margin: 10px; /* 卡片之间的间距 */
  8. border-radius: 10px; /* 圆角效果 */
  9. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* 阴影效果 */
  10. }
  11. ion-card-title {
  12. font-weight:bold;
  13. }
  14. /* 设置列表项的样式 */
  15. ion-item {
  16. margin: 5px 0; /* 列表项之间的间距 */
  17. }
  18. ion-button {
  19. font-size: 15px; /* 增大字体大小 */
  20. margin-top: 8px; /* 上间距,仅在需要时添加 */
  21. text-transform: none; /* 按钮文字不变形 */
  22. height: 35px;
  23. margin: 0 5px; /* 按钮之间的间距 */
  24. color: rgb(42, 50, 77);
  25. }
  26. /* 设置搜索框的样式 */
  27. ion-searchbar {
  28. padding: 10px; /* 内边距 */
  29. border-radius: 4px; /* 圆角 */
  30. font-size: 16px; /* 字体大小 */
  31. }
  32. /* 设置用户评价星星的样式 */
  33. ion-icon[name="star"] {
  34. color: gold; /* 星星颜色 */
  35. font-size: 1.2rem; /* 星星大小 */
  36. }
  37. ion-card-header {
  38. --background: #ffffff; /* 使用CSS变量设置背景颜色为白色 */
  39. /* 或者,如果你不使用CSS变量,可以直接使用background-color属性 */
  40. position: relative; /* 设置相对定位 */
  41. }
  42. /* 实际上,ion-toolbar默认会继承ion-card-header的样式,但你可以显式地设置它以确保一致性 */
  43. ion-toolbar {
  44. --background: #ffffff; /* 同样使用CSS变量,但通常不是必需的 */
  45. }
  46. /* 确保按钮的文本颜色是白色 */
  47. .button-text {
  48. color: #ffffff !important; /* 使用!important可以确保这个规则具有更高的优先级,但通常不推荐,除非确实需要 */
  49. /* 然而,在这个例子中,由于按钮本身可能有自己的颜色设置,你可能不需要为.button-text设置颜色,
  50. 而是应该确保按钮的color属性正确,并在需要时覆盖按钮的默认颜色设置 */
  51. }
  52. ion-avatar {
  53. width: 50px; /* 或者你需要的任何尺寸 */
  54. height: 50px; /* 保持宽高一致,避免变形 */
  55. }
  56. ion-avatar img {
  57. width: 100%; /* 让图片填满avatar */
  58. height: auto; /* 保持图片比例 */
  59. }
  60. .header-image {
  61. width: 100%;
  62. height: auto; /* 保持图片比例 */
  63. border-radius: 50%; /* 可选:将图片设置为圆形 */
  64. }
  65. .button-toolbar {
  66. display: flex;
  67. justify-content: space-between; /* 均匀分布按钮 */
  68. }
  69. .button-container {
  70. display: flex;
  71. width: 100%; /* 使按钮容器占满整个宽度 */
  72. }