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