styles.css 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. /* 全局页面样式 */
  2. body {
  3. font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  4. margin: 0;
  5. padding: 0;
  6. background-color: #f2f2f7; /* iOS风格的浅灰背景 */
  7. }
  8. /* 头部样式 */
  9. header {
  10. background-color: #ffffff;
  11. color: #333;
  12. padding: 20px;
  13. text-align: center;
  14. box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); /* 轻微阴影 */
  15. }
  16. /* 容器布局:包含侧边栏和主内容 */
  17. .container {
  18. display: flex;
  19. height: calc(100vh - 70px); /* 视口高度减去头部高度 */
  20. }
  21. /* 侧边栏样式 */
  22. aside {
  23. width: 200px;
  24. background-color: #f2f2f7;
  25. color: #000;
  26. padding: 20px;
  27. height: 100%;
  28. }
  29. aside ul {
  30. list-style: none;
  31. padding: 0;
  32. }
  33. aside ul li {
  34. margin: 20px 0;
  35. cursor: pointer;
  36. }
  37. /* 主内容区域 */
  38. main {
  39. flex: 1; /* 占据剩余宽度 */
  40. padding: 20px;
  41. overflow-y: auto; /* 启用垂直滚动 */
  42. }
  43. /* 瀑布流容器样式,每行最多显示4个卡片 */
  44. .license-info-container {
  45. display: flex;
  46. flex-wrap: wrap;
  47. gap: 20px; /* 卡片之间的间距 */
  48. }
  49. /* 卡片样式 */
  50. .license-info-card {
  51. position: relative;
  52. width: calc(25% - 20px); /* 每行4个卡片,减去间距 */
  53. background-color: #ffffff; /* 白色背景 */
  54. border-radius: 15px; /* iOS风格的圆角 */
  55. box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05); /* 轻微柔和的阴影 */
  56. overflow: hidden;
  57. transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out; /* 过渡效果 */
  58. margin-bottom: 20px;
  59. font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; /* iOS 系统字体 */
  60. padding-bottom: 20px; /* 添加底部填充,以防止内容溢出 */
  61. }
  62. /* 悬停效果 */
  63. .license-info-card:hover {
  64. transform: translateY(-3px); /* 悬停时轻微向上浮动 */
  65. box-shadow: 0 15px 25px rgba(0, 0, 0, 0.1); /* 悬停时增加阴影效果 */
  66. }
  67. /* 卡片顶部蓝色区域 */
  68. .license-info-card-header {
  69. background-color: #007aff; /* iOS风格的蓝色 */
  70. height: 50px; /* 顶部蓝色部分的高度 */
  71. border-top-left-radius: 15px;
  72. border-top-right-radius: 15px;
  73. display: flex;
  74. justify-content: center;
  75. align-items: center;
  76. padding: 10px;
  77. text-align: center;
  78. color: white; /* 项目名称字体颜色为白色 */
  79. }
  80. /* 标题样式:现在位于蓝色区域 */
  81. .card-title {
  82. font-size: 20px; /* 标题字体加大 */
  83. font-weight: 600; /* 标题字体加粗 */
  84. color: white; /* 项目名称字体颜色为白色,和背景颜色形成对比 */
  85. margin: 0;
  86. line-height: 1.2; /* 行间距 */
  87. }
  88. /* 副标题和其他文本样式 */
  89. .license-info-card-content {
  90. padding: 20px;
  91. color: #333;
  92. }
  93. .card-text {
  94. margin: 10px 0; /* 增加字段之间的间距 */
  95. font-size: 18px; /* 提高字体大小 */
  96. color: #3a3a3c; /* 中灰色,符合iOS风格 */
  97. line-height: 1.6; /* 行间距调整,确保更好的可读性 */
  98. }
  99. /* 许可证状态的颜色 */
  100. .license-status-green {
  101. color: #34c759; /* iOS的绿色 */
  102. }
  103. .license-status-yellow {
  104. color: #ffcc00; /* iOS的黄色 */
  105. }
  106. .license-status-red {
  107. color: #ff3b30; /* iOS的红色 */
  108. }
  109. /*这部分代码仅在设备屏幕宽度小于或等于 768 像素时生效
  110. */
  111. @media (max-width: 768px) {
  112. .license-info-modal-content.show {
  113. width: 90vw;
  114. height: 90vh;
  115. }
  116. /* 小屏幕下卡片调整为每行显示2个 */
  117. .license-info-card {
  118. width: calc(50% - 20px);
  119. height: auto; /* 调整小屏幕下的高度 */
  120. }
  121. }
  122. /*-----------------*/