styles.css 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364
  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. /* 小屏幕下卡片调整为每行显示2个 */
  113. .license-info-card {
  114. width: calc(50% - 20px);
  115. height: auto; /* 调整小屏幕下的高度 */
  116. }
  117. }
  118. /*-----------------*/
  119. /* 响应式设计,适配小屏幕 */
  120. @media (max-width: 768px) {
  121. .license-info-modal-content.show {
  122. width: 90vw; /* 在小屏设备中宽度为90% */
  123. height: 90vh; /* 高度为90% */
  124. }
  125. }
  126. /* 模态框样式,初始隐藏 */
  127. .license-info-modal {
  128. display: none; /* 初始隐藏模态框 */
  129. position: fixed; /* 固定位置,模态框将一直可见,随页面滚动保持位置 */
  130. top: 0;
  131. left: 0;
  132. width: 100%; /* 宽度占据整个屏幕 */
  133. height: 100%; /* 高度占据整个屏幕 */
  134. background-color: rgba(0, 0, 0, 0.2); /* 半透明背景,模态框弹出时背景变暗 */
  135. justify-content: center; /* 居中模态框水平 */
  136. align-items: center; /* 居中模态框垂直 */
  137. z-index: 1000; /* 保证模态框在所有元素之上显示 */
  138. overflow: hidden; /* 禁止模态框背景滚动 */
  139. }
  140. /* 模态框内容样式,带有圆角和阴影 */
  141. .license-info-modal-content {
  142. background-color: white; /* 模态框内部背景色为白色 */
  143. padding: 20px; /* 内部填充 */
  144. border-radius: 20px; /* 设置较大的圆角,符合iOS风格 */
  145. position: absolute; /* 使用绝对定位 */
  146. transform-origin: center; /* 动画从中心展开 */
  147. opacity: 0; /* 初始透明度为0,不可见 */
  148. transition: opacity 0.3s ease, transform 0.3s ease; /* 使用渐变效果使模态框逐渐显示 */
  149. box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); /* 模态框阴影,增加浮动感 */
  150. max-height: 80vh; /* 最大高度不超过视口的80% */
  151. overflow-y: auto; /* 如果内容超出高度则滚动 */
  152. }
  153. /* 模态框的初始缩放效果,配合过渡动画 */
  154. .license-info-modal-content {
  155. transform: scale(0.95); /* 初始有轻微缩放效果 */
  156. }
  157. /* 动画结束后的模态框样式,设置为80%大小且居中 */
  158. .license-info-modal-content.show {
  159. opacity: 1; /* 动画显示模态框 */
  160. width: 80vw; /* 宽度占据视口80% */
  161. height: 70vh; /* 高度占据视口70% */
  162. top: 50%; /* 垂直居中 */
  163. left: 50%; /* 水平居中 */
  164. transform: translate(-50%, -50%) scale(1); /* 完全居中,且带有缩放效果 */
  165. }
  166. /* 关闭按钮样式 */
  167. .license-info-close {
  168. position: absolute; /* 绝对定位,确保关闭按钮在模态框的右上角 */
  169. top: 10px;
  170. right: 20px;
  171. font-size: 28px; /* 关闭按钮的字体大小 */
  172. color: #007aff; /* iOS风格的蓝色 */
  173. cursor: pointer; /* 鼠标悬停时显示手指图标 */
  174. font-weight: 600; /* 设置按钮的字体粗细 */
  175. }
  176. /* 模态框上半部分的样式 */
  177. .license-info-modal-header {
  178. display: flex;
  179. flex-direction: column;
  180. align-items: center;
  181. margin-bottom: 20px;
  182. font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  183. }
  184. /* 标题的 iOS 风格 */
  185. .license-info-modal-header h2 {
  186. font-size: 24px;
  187. font-weight: 600;
  188. color: #333;
  189. margin-bottom: 10px;
  190. }
  191. /* 按钮组的样式 */
  192. .license-info-modal-button-group {
  193. display: flex;
  194. justify-content: space-around;
  195. width: 100%;
  196. margin-top: 10px;
  197. }
  198. /* 组样式:每组数据方框 */
  199. .license-info-group-box {
  200. border: 1px solid #ccc; /* 灰色边框 */
  201. border-radius: 8px; /* 设置圆角 */
  202. padding: 15px; /* 内部填充 */
  203. margin-bottom: 15px; /* 组之间的间隔 */
  204. background-color: #f9f9f9; /* 设置浅灰色背景 */
  205. box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* 设置轻微的阴影 */
  206. }
  207. .license-info-group-box p {
  208. margin: 5px 0;
  209. font-size: 16px;
  210. color: #333;
  211. font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; /* 符合 iOS 风格的字体 */
  212. }
  213. .license-info-group-title {
  214. font-weight: 600;
  215. margin-bottom: 10px;
  216. color: #007aff; /* iOS 风格的蓝色标题 */
  217. }
  218. .license-info-modal-button {
  219. padding: 12px 20px;
  220. background-color: #007aff; /* iOS风格的蓝色按钮 */
  221. color: white; /* 按钮字体颜色为白色 */
  222. border: none;
  223. border-radius: 12px; /* 设置圆角按钮 */
  224. font-size: 16px;
  225. font-weight: 500;
  226. cursor: pointer; /* 鼠标悬停时显示手指图标 */
  227. transition: background-color 0.3s ease; /* 背景颜色过渡效果 */
  228. }
  229. .license-info-modal-button:hover {
  230. background-color: #005bb5; /* 按钮的悬停效果 */
  231. }
  232. /* 模态框下半部分的样式 */
  233. .license-info-modal-body {
  234. overflow-y: auto; /* 当内容超出容器时,启用垂直滚动条 */
  235. flex-grow: 1; /* 占据模态框的剩余空间 */
  236. font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  237. color: #3a3a3c; /* 字体颜色为深灰色 */
  238. font-size: 18px;
  239. line-height: 1.6; /* 行高 */
  240. }
  241. /* 添加滚动条样式,符合iOS的滑动效果 */
  242. .license-info-modal-body::-webkit-scrollbar {
  243. width: 6px;
  244. }
  245. .license-info-modal-body::-webkit-scrollbar-thumb {
  246. background-color: rgba(0, 0, 0, 0.2);
  247. border-radius: 3px;
  248. }
  249. /* 分页按钮组样式 */
  250. .license-info-modal-pagination {
  251. display: flex;
  252. justify-content: center;
  253. margin-top: 20px;
  254. }
  255. .license-info-modal-pagination button {
  256. padding: 10px 15px;
  257. margin: 0 5px;
  258. background-color: #007aff;
  259. color: white;
  260. border: none;
  261. border-radius: 5px;
  262. cursor: pointer;
  263. font-size: 16px;
  264. transition: background-color 0.3s ease;
  265. }
  266. .license-info-modal-pagination button:hover {
  267. background-color: #005bb5; /* 鼠标悬停时按钮背景颜色变深 */
  268. }
  269. .license-info-modal-pagination button:disabled {
  270. background-color: #ccc; /* 禁用时按钮为灰色 */
  271. cursor: not-allowed;
  272. }
  273. /* 分页下拉框样式 */
  274. .license-info-modal-pagination select {
  275. padding: 10px 15px;
  276. margin: 0 5px;
  277. background-color: #007aff;
  278. color: white;
  279. border: none;
  280. border-radius: 5px;
  281. cursor: pointer;
  282. font-size: 16px;
  283. transition: background-color 0.3s ease;
  284. }
  285. /* 下拉框中的选项样式 */
  286. .license-info-modal-pagination select option {
  287. background-color: white; /* 默认背景颜色 */
  288. color: black; /* 默认字体颜色 */
  289. }
  290. /* 鼠标悬停选项时 */
  291. .license-info-modal-pagination select option:hover {
  292. background-color: #007aff; /* 鼠标悬停时选项变为蓝色 */
  293. color: white; /* 悬停时字体颜色变为白色 */
  294. }
  295. /* 选中的选项的样式 */
  296. .license-info-modal-pagination select option:checked {
  297. background-color: #ccc; /* 当前选中的选项背景为蓝色 */
  298. color: white; /* 当前选中的选项字体颜色为白色 */
  299. }
  300. /* 活跃菜单项样式 */
  301. nav ul li a.active {
  302. background-color: #007aff;
  303. color: white;
  304. }
  305. /* 用户管理模态框------------------------------------------------------ */
  306. /* 用户管理模态框的背景层 */
  307. /* 响应式设计,适配小屏幕 */
  308. /* 用户管理模态框的背景层 */