styles.css 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453
  1. /* 全局样式 */
  2. body {
  3. background-color: #f8f9fa;
  4. font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  5. }
  6. /* 导航栏样式 */
  7. .navbar-brand {
  8. font-weight: 600;
  9. }
  10. .navbar-brand i {
  11. margin-right: 8px;
  12. }
  13. /* 页面内容 */
  14. .page-content {
  15. min-height: calc(100vh - 100px);
  16. }
  17. /* 主容器样式 - 添加左右内边距 */
  18. .container-fluid {
  19. max-width: 1400px;
  20. margin: 0 auto;
  21. padding-left: 2rem;
  22. padding-right: 2rem;
  23. }
  24. /* 响应式内边距 */
  25. @media (max-width: 1200px) {
  26. .container-fluid {
  27. padding-left: 1.5rem;
  28. padding-right: 1.5rem;
  29. }
  30. }
  31. @media (max-width: 768px) {
  32. .container-fluid {
  33. padding-left: 1rem;
  34. padding-right: 1rem;
  35. }
  36. }
  37. @media (max-width: 576px) {
  38. .container-fluid {
  39. padding-left: 0.75rem;
  40. padding-right: 0.75rem;
  41. }
  42. }
  43. /* 统计卡片 */
  44. .stat-card {
  45. border: none;
  46. border-radius: 12px;
  47. box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  48. transition: transform 0.2s ease;
  49. }
  50. .stat-card:hover {
  51. transform: translateY(-2px);
  52. }
  53. .stat-icon {
  54. font-size: 2rem;
  55. opacity: 0.7;
  56. }
  57. /* 卡片样式 */
  58. .card {
  59. border: none;
  60. border-radius: 12px;
  61. box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  62. margin-bottom: 20px;
  63. }
  64. .card-header {
  65. background-color: #fff;
  66. border-bottom: 1px solid #e9ecef;
  67. border-radius: 12px 12px 0 0 !important;
  68. font-weight: 600;
  69. }
  70. /* 节点列表样式 */
  71. .node-item {
  72. border: 1px solid #e9ecef;
  73. border-radius: 8px;
  74. padding: 15px;
  75. margin-bottom: 10px;
  76. background: white;
  77. transition: all 0.2s ease;
  78. }
  79. .node-item:hover {
  80. box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  81. transform: translateY(-1px);
  82. }
  83. .node-header {
  84. display: flex;
  85. justify-content: space-between;
  86. align-items: center;
  87. margin-bottom: 10px;
  88. gap: 12px;
  89. }
  90. .node-name {
  91. font-weight: 600;
  92. color: #333;
  93. flex: 1;
  94. margin-right: 8px;
  95. }
  96. .node-status {
  97. padding: 4px 8px;
  98. border-radius: 12px;
  99. font-size: 0.8rem;
  100. font-weight: 500;
  101. }
  102. .node-status.online {
  103. background-color: #d4edda;
  104. color: #155724;
  105. }
  106. .node-status.offline {
  107. background-color: #f8d7da;
  108. color: #721c24;
  109. }
  110. .node-info {
  111. display: grid;
  112. grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  113. gap: 10px;
  114. font-size: 0.85rem;
  115. color: #666;
  116. }
  117. .node-info-item.last-test {
  118. grid-column: 1 / -1;
  119. padding-top: 0;
  120. }
  121. .latency-info {
  122. font-weight: 500;
  123. }
  124. .latency-value {
  125. margin-left: 4px;
  126. font-weight: 600;
  127. color: #007bff;
  128. }
  129. .latency-separator {
  130. margin: 0 8px;
  131. color: #ccc;
  132. font-weight: normal;
  133. }
  134. .node-info-item {
  135. display: flex;
  136. align-items: center;
  137. white-space: nowrap;
  138. overflow: hidden;
  139. text-overflow: ellipsis;
  140. }
  141. .node-info-item i {
  142. margin-right: 4px;
  143. width: 14px;
  144. flex-shrink: 0;
  145. }
  146. /* 测速结果样式 */
  147. .result-item {
  148. border: 1px solid #e9ecef;
  149. border-radius: 8px;
  150. padding: 15px;
  151. margin-bottom: 10px;
  152. background: white;
  153. }
  154. .result-success {
  155. border-left: 4px solid #28a745;
  156. }
  157. .result-failure {
  158. border-left: 4px solid #dc3545;
  159. }
  160. .result-header {
  161. display: flex;
  162. justify-content: between;
  163. align-items: center;
  164. margin-bottom: 10px;
  165. }
  166. .result-node {
  167. font-weight: 600;
  168. color: #333;
  169. }
  170. .result-time {
  171. color: #666;
  172. font-size: 0.9rem;
  173. }
  174. .result-details {
  175. display: grid;
  176. grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  177. gap: 10px;
  178. font-size: 0.9rem;
  179. }
  180. .result-detail {
  181. display: flex;
  182. align-items: center;
  183. }
  184. .result-detail i {
  185. margin-right: 5px;
  186. width: 16px;
  187. }
  188. /* 通知样式 */
  189. .notification-item {
  190. border: 1px solid #e9ecef;
  191. border-radius: 8px;
  192. padding: 15px;
  193. margin-bottom: 10px;
  194. background: white;
  195. }
  196. .notification-sent {
  197. border-left: 4px solid #28a745;
  198. }
  199. .notification-pending {
  200. border-left: 4px solid #ffc107;
  201. }
  202. .notification-failed {
  203. border-left: 4px solid #dc3545;
  204. }
  205. /* 按钮样式 */
  206. .btn {
  207. border-radius: 8px;
  208. font-weight: 500;
  209. transition: all 0.2s ease;
  210. }
  211. .btn:hover {
  212. transform: translateY(-1px);
  213. }
  214. .btn-primary {
  215. background-color: #0d6efd;
  216. border-color: #0d6efd;
  217. }
  218. .btn-success {
  219. background-color: #198754;
  220. border-color: #198754;
  221. }
  222. .btn-info {
  223. background-color: #0dcaf0;
  224. border-color: #0dcaf0;
  225. }
  226. .btn-warning {
  227. background-color: #ffc107;
  228. border-color: #ffc107;
  229. color: #000;
  230. }
  231. .btn-danger {
  232. background-color: #dc3545;
  233. border-color: #dc3545;
  234. }
  235. /* 表单样式 */
  236. .form-control, .form-select {
  237. border-radius: 8px;
  238. border: 1px solid #ced4da;
  239. transition: border-color 0.2s ease;
  240. }
  241. .form-control:focus, .form-select:focus {
  242. border-color: #0d6efd;
  243. box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
  244. }
  245. /* 分页样式 */
  246. .pagination {
  247. justify-content: center;
  248. margin-top: 20px;
  249. }
  250. .page-link {
  251. border-radius: 6px;
  252. margin: 0 2px;
  253. border: 1px solid #dee2e6;
  254. }
  255. .page-link:hover {
  256. background-color: #e9ecef;
  257. }
  258. .page-item.active .page-link {
  259. background-color: #0d6efd;
  260. border-color: #0d6efd;
  261. }
  262. /* 加载覆盖层 */
  263. .loading-overlay {
  264. position: fixed;
  265. top: 0;
  266. left: 0;
  267. width: 100%;
  268. height: 100%;
  269. background-color: rgba(0, 0, 0, 0.5);
  270. display: flex;
  271. justify-content: center;
  272. align-items: center;
  273. z-index: 9999;
  274. }
  275. .loading-spinner {
  276. text-align: center;
  277. color: white;
  278. }
  279. /* 响应式设计 */
  280. @media (max-width: 768px) {
  281. .node-info {
  282. grid-template-columns: 1fr;
  283. gap: 6px;
  284. font-size: 0.8rem;
  285. }
  286. .result-details {
  287. grid-template-columns: 1fr;
  288. }
  289. .stat-card {
  290. margin-bottom: 15px;
  291. }
  292. .node-info-item {
  293. white-space: normal;
  294. }
  295. }
  296. /* 动画效果 */
  297. @keyframes fadeIn {
  298. from {
  299. opacity: 0;
  300. transform: translateY(20px);
  301. }
  302. to {
  303. opacity: 1;
  304. transform: translateY(0);
  305. }
  306. }
  307. .fade-in {
  308. animation: fadeIn 0.3s ease;
  309. }
  310. /* 状态指示器 */
  311. .status-indicator {
  312. display: inline-flex;
  313. align-items: center;
  314. gap: 5px;
  315. }
  316. .status-indicator i {
  317. font-size: 0.8rem;
  318. }
  319. /* 工具提示 */
  320. .tooltip {
  321. font-size: 0.8rem;
  322. }
  323. /* 徽章样式 */
  324. .badge {
  325. border-radius: 12px;
  326. font-weight: 500;
  327. }
  328. /* 进度条样式 */
  329. .progress {
  330. border-radius: 10px;
  331. height: 8px;
  332. }
  333. .progress-bar {
  334. border-radius: 10px;
  335. }
  336. /* 表格样式 */
  337. .table {
  338. border-radius: 8px;
  339. overflow: hidden;
  340. }
  341. .table th {
  342. background-color: #f8f9fa;
  343. border-bottom: 2px solid #dee2e6;
  344. font-weight: 600;
  345. }
  346. .table td {
  347. vertical-align: middle;
  348. }
  349. /* 模态框样式 */
  350. .modal-content {
  351. border-radius: 12px;
  352. border: none;
  353. box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  354. }
  355. .modal-header {
  356. border-bottom: 1px solid #e9ecef;
  357. border-radius: 12px 12px 0 0;
  358. }
  359. .modal-footer {
  360. border-top: 1px solid #e9ecef;
  361. border-radius: 0 0 12px 12px;
  362. }
  363. /* 自定义滚动条 */
  364. ::-webkit-scrollbar {
  365. width: 8px;
  366. }
  367. ::-webkit-scrollbar-track {
  368. background: #f1f1f1;
  369. border-radius: 4px;
  370. }
  371. ::-webkit-scrollbar-thumb {
  372. background: #c1c1c1;
  373. border-radius: 4px;
  374. }
  375. ::-webkit-scrollbar-thumb:hover {
  376. background: #a8a8a8;
  377. }