style.css 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940
  1. /* 全局样式 */
  2. * {
  3. margin: 0;
  4. padding: 0;
  5. box-sizing: border-box;
  6. }
  7. body {
  8. font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  9. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  10. min-height: 100vh;
  11. color: #333;
  12. }
  13. .container {
  14. display: flex;
  15. flex-direction: column;
  16. height: 100vh;
  17. max-width: 1400px;
  18. margin: 0 auto;
  19. background: rgba(255, 255, 255, 0.95);
  20. box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
  21. }
  22. /* 头部样式 */
  23. .header {
  24. display: flex;
  25. justify-content: space-between;
  26. align-items: center;
  27. padding: 15px 20px;
  28. background: linear-gradient(135deg, #2c3e50, #34495e);
  29. color: white;
  30. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  31. }
  32. .header h1 {
  33. font-size: 1.5rem;
  34. font-weight: 600;
  35. }
  36. .header h1 i {
  37. margin-right: 10px;
  38. color: #3498db;
  39. }
  40. .header-right {
  41. display: flex;
  42. align-items: center;
  43. gap: 20px;
  44. }
  45. /* 头部控制按键样式 */
  46. .header-controls {
  47. display: flex;
  48. gap: 8px;
  49. align-items: center;
  50. }
  51. .header-controls .btn {
  52. padding: 8px 16px;
  53. font-size: 13px;
  54. font-weight: 500;
  55. border-radius: 6px;
  56. border: none;
  57. cursor: pointer;
  58. transition: all 0.3s ease;
  59. white-space: nowrap;
  60. }
  61. .header-controls .btn:hover {
  62. transform: translateY(-1px);
  63. box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  64. }
  65. .header-controls .btn:disabled {
  66. opacity: 0.6;
  67. cursor: not-allowed;
  68. transform: none;
  69. box-shadow: none;
  70. }
  71. .connection-status {
  72. display: flex;
  73. align-items: center;
  74. font-weight: 500;
  75. }
  76. .status-connected {
  77. color: #2ecc71;
  78. }
  79. .status-disconnected {
  80. color: #e74c3c;
  81. }
  82. .status-connected i, .status-disconnected i {
  83. margin-right: 5px;
  84. animation: pulse 2s infinite;
  85. }
  86. @keyframes pulse {
  87. 0% { opacity: 1; }
  88. 50% { opacity: 0.5; }
  89. 100% { opacity: 1; }
  90. }
  91. /* 三栏布局样式 */
  92. .main-content {
  93. display: flex;
  94. height: calc(100vh - 80px);
  95. }
  96. .sidebar {
  97. flex: 0 0 8%;
  98. min-width: 80px;
  99. max-width: 120px;
  100. background: #f0f3fa;
  101. display: flex;
  102. flex-direction: column;
  103. align-items: stretch;
  104. padding: 24px 0 24px 0;
  105. border-right: 1px solid #e0e6ef;
  106. box-shadow: 2px 0 8px rgba(52,152,219,0.03);
  107. z-index: 2;
  108. }
  109. .sidebar-btn {
  110. background: none;
  111. border: none;
  112. outline: none;
  113. padding: 18px 0;
  114. font-size: 1.08rem;
  115. color: #2980b9;
  116. font-weight: 600;
  117. cursor: pointer;
  118. transition: background 0.2s, color 0.2s;
  119. border-left: 4px solid transparent;
  120. text-align: left;
  121. padding-left: 18px;
  122. }
  123. .sidebar-btn.active, .sidebar-btn:hover {
  124. background: #eaf6fb;
  125. color: #1565c0;
  126. border-left: 4px solid #3498db;
  127. }
  128. .center-panel {
  129. flex: 1;
  130. min-width: 0;
  131. background: #fff;
  132. padding: 32px 24px;
  133. overflow-y: auto;
  134. box-shadow: 1px 0 8px rgba(52,152,219,0.02);
  135. }
  136. .center-content {
  137. width: 100%;
  138. height: 100%;
  139. }
  140. .monitor-panel {
  141. flex: 0 0 32%;
  142. min-width: 320px;
  143. max-width: none;
  144. background: #f7fafd;
  145. border-left: 1.5px solid #e3eaf2;
  146. box-shadow: -2px 0 12px rgba(52,152,219,0.04);
  147. display: flex;
  148. flex-direction: column;
  149. padding: 24px 18px 18px 18px;
  150. z-index: 2;
  151. }
  152. .monitor-status {
  153. margin-bottom: 18px;
  154. font-size: 1.1rem;
  155. font-weight: 600;
  156. color: #2980b9;
  157. }
  158. .monitor-log {
  159. flex: 1;
  160. background: #23272e;
  161. border-radius: 10px;
  162. box-shadow: 0 2px 12px rgba(52,152,219,0.07);
  163. padding: 0;
  164. overflow: hidden;
  165. display: flex;
  166. flex-direction: column;
  167. }
  168. .terminal {
  169. flex: 1;
  170. display: flex;
  171. flex-direction: column;
  172. background: #1e1e1e;
  173. color: #d4d4d4;
  174. border-radius: 0 0 10px 10px;
  175. overflow: hidden;
  176. }
  177. .terminal-output {
  178. flex: 1;
  179. padding: 15px;
  180. overflow-y: auto;
  181. white-space: pre-wrap;
  182. word-break: break-all;
  183. tab-size: 4;
  184. }
  185. .terminal-input {
  186. display: flex;
  187. align-items: center;
  188. padding: 10px 15px;
  189. background: #2d2d2d;
  190. border-top: 1px solid #404040;
  191. }
  192. .terminal-prompt {
  193. color: #00ff00;
  194. font-weight: bold;
  195. margin-right: 8px;
  196. user-select: none;
  197. }
  198. .terminal-input-field {
  199. flex: 1;
  200. background: transparent;
  201. border: none;
  202. outline: none;
  203. color: #d4d4d4;
  204. font-family: inherit;
  205. font-size: inherit;
  206. padding: 0;
  207. tab-size: 4; /* 设置Tab字符显示为4个空格宽度 */
  208. white-space: pre; /* 保持空白字符(包括Tab)的原始格式 */
  209. }
  210. .terminal-input-field::placeholder {
  211. color: #666;
  212. }
  213. .terminal-input-field:disabled {
  214. opacity: 0.6;
  215. }
  216. /* ANSI颜色支持 */
  217. @keyframes blink {
  218. 0%, 50% { opacity: 1; }
  219. 51%, 100% { opacity: 0; }
  220. }
  221. /* 确保ANSI颜色在终端中正确显示 */
  222. .terminal-output span {
  223. white-space: inherit;
  224. }
  225. /* 左侧面板 */
  226. .left-panel {
  227. flex: 2;
  228. display: flex;
  229. flex-direction: column;
  230. padding: 20px;
  231. background: #f8f9fa;
  232. border-right: 1px solid #dee2e6;
  233. }
  234. /* 连接控制 */
  235. .connection-control {
  236. background: white;
  237. padding: 15px;
  238. border-radius: 8px;
  239. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  240. margin-bottom: 15px;
  241. }
  242. /* 串口配置 */
  243. .serial-config {
  244. background: white;
  245. padding: 15px;
  246. border-radius: 8px;
  247. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  248. margin-bottom: 15px;
  249. }
  250. .config-row {
  251. display: flex;
  252. align-items: center;
  253. gap: 10px;
  254. margin-bottom: 10px;
  255. flex-wrap: wrap;
  256. }
  257. .config-row:last-child {
  258. margin-bottom: 0;
  259. }
  260. .config-row label {
  261. font-weight: 500;
  262. min-width: 60px;
  263. }
  264. .config-row select, .config-row input[type="number"] {
  265. padding: 5px 8px;
  266. border: 1px solid #ddd;
  267. border-radius: 4px;
  268. font-size: 14px;
  269. }
  270. /* 显示选项 */
  271. .display-options {
  272. background: white;
  273. padding: 10px 15px;
  274. border-radius: 8px;
  275. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  276. margin-bottom: 15px;
  277. display: flex;
  278. gap: 20px;
  279. flex-wrap: wrap;
  280. }
  281. .checkbox-label {
  282. display: flex;
  283. align-items: center;
  284. gap: 5px;
  285. font-weight: 500;
  286. cursor: pointer;
  287. }
  288. .checkbox-label input[type="checkbox"] {
  289. transform: scale(1.2);
  290. }
  291. .line-timeout-config {
  292. display: flex;
  293. align-items: center;
  294. gap: 5px;
  295. font-weight: 500;
  296. }
  297. .timeout-input {
  298. width: 60px;
  299. padding: 2px 5px;
  300. border: 1px solid #ddd;
  301. border-radius: 3px;
  302. font-size: 12px;
  303. text-align: center;
  304. }
  305. /* 终端容器 */
  306. .terminal-container {
  307. flex: 1;
  308. background: white;
  309. border-radius: 8px;
  310. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  311. margin-bottom: 15px;
  312. overflow: hidden;
  313. }
  314. /* 右侧面板 */
  315. .right-panel {
  316. flex: 1;
  317. background: #f8f9fa;
  318. overflow-y: auto;
  319. display: flex;
  320. flex-direction: column;
  321. gap: 20px;
  322. align-items: stretch;
  323. }
  324. .control-panel {
  325. padding: 20px;
  326. }
  327. .control-panel h3 {
  328. color: #2c3e50;
  329. margin-bottom: 20px;
  330. font-size: 1.3rem;
  331. border-bottom: 2px solid #3498db;
  332. padding-bottom: 10px;
  333. }
  334. /* API 部分 */
  335. .api-section {
  336. background: white;
  337. padding: 15px;
  338. border-radius: 8px;
  339. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  340. margin-bottom: 20px;
  341. }
  342. .api-section h4 {
  343. color: #34495e;
  344. margin-bottom: 15px;
  345. font-size: 1.1rem;
  346. display: flex;
  347. align-items: center;
  348. gap: 8px;
  349. }
  350. .param-group {
  351. margin-bottom: 12px;
  352. }
  353. .param-group label {
  354. display: block;
  355. font-weight: 500;
  356. margin-bottom: 5px;
  357. color: #555;
  358. }
  359. .param-input {
  360. width: 100%;
  361. padding: 8px 10px;
  362. border: 1px solid #ddd;
  363. border-radius: 4px;
  364. font-size: 14px;
  365. transition: border-color 0.3s;
  366. }
  367. .param-input:focus {
  368. outline: none;
  369. border-color: #3498db;
  370. box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
  371. }
  372. .custom-command-input {
  373. width: 100%;
  374. min-height: 80px;
  375. padding: 8px 10px;
  376. border: 1px solid #ddd;
  377. border-radius: 4px;
  378. font-size: 14px;
  379. font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  380. resize: vertical;
  381. }
  382. .button-group {
  383. display: flex;
  384. gap: 8px;
  385. flex-wrap: wrap;
  386. margin-top: 10px;
  387. }
  388. /* 按钮样式 */
  389. .btn {
  390. padding: 8px 16px;
  391. border: none;
  392. border-radius: 4px;
  393. font-size: 14px;
  394. font-weight: 500;
  395. cursor: pointer;
  396. transition: all 0.3s;
  397. display: flex;
  398. align-items: center;
  399. gap: 5px;
  400. }
  401. .btn:disabled {
  402. opacity: 0.6;
  403. cursor: not-allowed;
  404. }
  405. .btn-primary {
  406. background: #3498db;
  407. color: white;
  408. }
  409. .btn-primary:hover:not(:disabled) {
  410. background: #2980b9;
  411. transform: translateY(-1px);
  412. }
  413. .btn-secondary {
  414. background: #95a5a6;
  415. color: white;
  416. }
  417. .btn-secondary:hover:not(:disabled) {
  418. background: #7f8c8d;
  419. transform: translateY(-1px);
  420. }
  421. .btn-success {
  422. background: #2ecc71;
  423. color: white;
  424. }
  425. .btn-success:hover:not(:disabled) {
  426. background: #27ae60;
  427. transform: translateY(-1px);
  428. }
  429. .btn-warning {
  430. background: #f39c12;
  431. color: white;
  432. }
  433. .btn-warning:hover:not(:disabled) {
  434. background: #e67e22;
  435. transform: translateY(-1px);
  436. }
  437. .btn-info {
  438. background: #17a2b8;
  439. color: white;
  440. }
  441. .btn-info:hover:not(:disabled) {
  442. background: #138496;
  443. transform: translateY(-1px);
  444. }
  445. /* 自定义命令列表 */
  446. .custom-commands-list {
  447. margin-top: 10px;
  448. max-height: 150px;
  449. overflow-y: auto;
  450. }
  451. .custom-command-item {
  452. background: #f8f9fa;
  453. padding: 8px 10px;
  454. margin-bottom: 5px;
  455. border-radius: 4px;
  456. border-left: 3px solid #3498db;
  457. font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  458. font-size: 12px;
  459. cursor: pointer;
  460. transition: background-color 0.3s;
  461. }
  462. .custom-command-item:hover {
  463. background: #e9ecef;
  464. }
  465. /* 终端消息样式 */
  466. .message {
  467. margin-bottom: 5px;
  468. padding: 2px 0;
  469. }
  470. .message-sent {
  471. color: #2ecc71;
  472. }
  473. .message-received {
  474. color: #ffffff;
  475. }
  476. .message-error {
  477. color: #e74c3c;
  478. }
  479. .message-info {
  480. color: #f39c12;
  481. }
  482. .timestamp {
  483. color: #7f8c8d;
  484. font-size: 11px;
  485. margin-right: 8px;
  486. font-weight: 500;
  487. letter-spacing: 0.5px;
  488. }
  489. .milliseconds {
  490. color: #3498db;
  491. font-weight: 600;
  492. }
  493. /* 响应式设计 */
  494. @media (max-width: 1200px) {
  495. .monitor-panel { min-width: 220px; padding: 12px 4px 12px 4px; }
  496. .sidebar { min-width: 50px; }
  497. .connection-button-group .btn {
  498. padding: 10px 16px;
  499. font-size: 14px;
  500. }
  501. .utility-button-group .btn {
  502. padding: 8px 12px;
  503. font-size: 13px;
  504. }
  505. }
  506. @media (max-width: 900px) {
  507. .main-content { flex-direction: column; }
  508. .sidebar, .monitor-panel { flex: none; min-width: 0; max-width: none; }
  509. .center-panel { flex: 1 1 100%; }
  510. }
  511. @media (max-width: 1024px) {
  512. .container {
  513. margin: 0;
  514. border-radius: 0;
  515. }
  516. .header {
  517. padding: 10px 15px;
  518. }
  519. .header h1 {
  520. font-size: 1.2rem;
  521. }
  522. .config-row {
  523. flex-direction: column;
  524. align-items: stretch;
  525. }
  526. .display-options {
  527. flex-direction: column;
  528. gap: 10px;
  529. }
  530. .button-group {
  531. flex-direction: column;
  532. }
  533. }
  534. @media (max-width: 768px) {
  535. .container {
  536. margin: 0;
  537. border-radius: 0;
  538. }
  539. .header {
  540. padding: 10px 15px;
  541. }
  542. .header h1 {
  543. font-size: 1.2rem;
  544. }
  545. .config-row {
  546. flex-direction: column;
  547. align-items: stretch;
  548. }
  549. .display-options {
  550. flex-direction: column;
  551. gap: 10px;
  552. }
  553. .button-group {
  554. flex-direction: column;
  555. }
  556. }
  557. /* Python脚本下载/发送按钮统一样式 */
  558. .download-btn {
  559. display: block;
  560. width: 100%;
  561. padding: 12px 0;
  562. margin-bottom: 8px;
  563. border: none;
  564. border-radius: 6px;
  565. font-size: 18px;
  566. font-weight: bold;
  567. cursor: pointer;
  568. transition: background 0.2s;
  569. }
  570. .download-offline {
  571. background: #f5f5f5;
  572. color: #222;
  573. }
  574. .download-drag {
  575. background: #e74c3c;
  576. color: #fff;
  577. }
  578. .send-offline {
  579. background: #3498db;
  580. color: #fff;
  581. }
  582. .send-drag {
  583. background: #2980b9;
  584. color: #fff;
  585. }
  586. /* 保证按钮和进度条、日志都在白色圆角框内,且按钮宽度一致 */
  587. .config-group {
  588. background: #fff;
  589. border-radius: 12px;
  590. box-shadow: 0 2px 8px rgba(52,152,219,0.06);
  591. padding: 24px 18px 18px 18px;
  592. margin-bottom: 18px;
  593. display: flex;
  594. flex-direction: column;
  595. align-items: stretch;
  596. }
  597. .download-btn {
  598. width: 100%;
  599. margin-bottom: 12px;
  600. }
  601. #pyYmodemProgress, #pyYmodemLog {
  602. margin-top: 8px;
  603. }
  604. /* 顶部连接控制区域 */
  605. .top-connection-controls {
  606. background: #fff;
  607. border-radius: 12px;
  608. padding: 20px;
  609. margin-bottom: 20px;
  610. box-shadow: 0 2px 12px rgba(52,152,219,0.08);
  611. border: 1px solid #e3eaf2;
  612. }
  613. .connection-button-group {
  614. display: flex;
  615. gap: 12px;
  616. margin-bottom: 15px;
  617. }
  618. .connection-button-group .btn {
  619. flex: 1;
  620. padding: 12px 20px;
  621. font-size: 15px;
  622. font-weight: 600;
  623. border-radius: 8px;
  624. transition: all 0.3s ease;
  625. }
  626. .utility-button-group {
  627. display: flex;
  628. gap: 8px;
  629. }
  630. .utility-button-group .btn {
  631. flex: 1;
  632. padding: 10px 16px;
  633. font-size: 14px;
  634. border-radius: 6px;
  635. }
  636. /* 隐藏的配置区域 */
  637. .hidden-config {
  638. position: absolute;
  639. left: -9999px;
  640. visibility: hidden;
  641. }
  642. /* 多文件配置表格样式 */
  643. .multi-file-config {
  644. background: #fff;
  645. border-radius: 8px;
  646. border: 1px solid #e3eaf2;
  647. overflow: hidden;
  648. box-shadow: 0 1px 4px rgba(52,152,219,0.04);
  649. }
  650. .file-table-header {
  651. display: grid;
  652. grid-template-columns: 2fr 2fr 2fr 1fr;
  653. gap: 12px;
  654. padding: 12px 16px;
  655. background: #f8fafc;
  656. border-bottom: 1px solid #e3eaf2;
  657. font-weight: 600;
  658. color: #2980b9;
  659. font-size: 14px;
  660. }
  661. .file-table-body {
  662. max-height: 300px;
  663. overflow-y: auto;
  664. }
  665. .file-table-row {
  666. display: grid;
  667. grid-template-columns: 2fr 2fr 2fr 1fr;
  668. gap: 12px;
  669. padding: 12px 16px;
  670. border-bottom: 1px solid #f1f5f9;
  671. align-items: center;
  672. transition: background-color 0.2s;
  673. }
  674. .file-table-row:hover {
  675. background: #f8fafc;
  676. }
  677. .file-table-row:last-child {
  678. border-bottom: none;
  679. }
  680. .file-name-col, .file-address-col, .file-algorithm-col, .file-action-col {
  681. display: flex;
  682. align-items: center;
  683. }
  684. .file-table-row input {
  685. width: 100%;
  686. padding: 8px 12px;
  687. border: 1px solid #d0d7de;
  688. border-radius: 4px;
  689. font-size: 13px;
  690. background: #fff;
  691. transition: border-color 0.2s;
  692. }
  693. .file-table-row input:focus {
  694. outline: none;
  695. border-color: #3498db;
  696. box-shadow: 0 0 0 2px rgba(52,152,219,0.1);
  697. }
  698. .file-table-row .delete-file-btn {
  699. padding: 6px 10px;
  700. background: #e74c3c;
  701. color: white;
  702. border: none;
  703. border-radius: 4px;
  704. cursor: pointer;
  705. font-size: 12px;
  706. transition: background-color 0.2s;
  707. }
  708. .file-table-row .delete-file-btn:hover {
  709. background: #c0392b;
  710. }
  711. .file-table-actions {
  712. padding: 16px;
  713. background: #f8fafc;
  714. border-top: 1px solid #e3eaf2;
  715. display: flex;
  716. gap: 12px;
  717. }
  718. .file-table-actions .btn {
  719. padding: 8px 16px;
  720. font-size: 13px;
  721. border-radius: 4px;
  722. border: none;
  723. cursor: pointer;
  724. transition: all 0.2s;
  725. display: flex;
  726. align-items: center;
  727. gap: 6px;
  728. }
  729. .file-table-actions .btn-success {
  730. background: #2ecc71;
  731. color: white;
  732. }
  733. .file-table-actions .btn-success:hover {
  734. background: #27ae60;
  735. }
  736. .file-table-actions .btn-warning {
  737. background: #f39c12;
  738. color: white;
  739. }
  740. .file-table-actions .btn-warning:hover {
  741. background: #e67e22;
  742. }
  743. /* 响应式设计 */
  744. @media (max-width: 768px) {
  745. .file-table-header,
  746. .file-table-row {
  747. grid-template-columns: 1fr;
  748. gap: 8px;
  749. }
  750. .file-table-header {
  751. display: none;
  752. }
  753. .file-table-row {
  754. padding: 16px;
  755. border: 1px solid #e3eaf2;
  756. border-radius: 8px;
  757. margin-bottom: 8px;
  758. }
  759. .file-table-row::before {
  760. content: "文件配置";
  761. font-weight: 600;
  762. color: #2980b9;
  763. margin-bottom: 8px;
  764. display: block;
  765. }
  766. }
  767. /* 主终端日志前缀样式 */
  768. .log-prefix-python { color: #27ae60; font-weight: bold; }
  769. .log-prefix-flm { color: #2980b9; font-weight: bold; }
  770. /* 响应式设计 - 小屏幕适配 */
  771. @media (max-width: 1200px) {
  772. .header-controls {
  773. gap: 6px;
  774. }
  775. .header-controls .btn {
  776. padding: 6px 12px;
  777. font-size: 12px;
  778. }
  779. }
  780. @media (max-width: 900px) {
  781. .header-right {
  782. gap: 15px;
  783. }
  784. .header-controls {
  785. gap: 4px;
  786. }
  787. .header-controls .btn {
  788. padding: 5px 10px;
  789. font-size: 11px;
  790. }
  791. .header-controls .btn i {
  792. margin-right: 3px;
  793. }
  794. }
  795. @media (max-width: 700px) {
  796. .header {
  797. flex-direction: column;
  798. gap: 15px;
  799. padding: 15px;
  800. }
  801. .header-right {
  802. flex-direction: column;
  803. gap: 10px;
  804. align-items: center;
  805. }
  806. .header-controls {
  807. flex-wrap: wrap;
  808. justify-content: center;
  809. gap: 6px;
  810. }
  811. .header-controls .btn {
  812. padding: 6px 12px;
  813. font-size: 12px;
  814. }
  815. }