index.css 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541
  1. @import url("../static/css/bootstrap.min.css");
  2. /* 基础样式 */
  3. :root {
  4. --primary-color: #4285f4;
  5. --hover-color: #3367d6;
  6. --error-color: #f44336;
  7. --success-color: #4caf50;
  8. --panel-bg: #f5f5f5;
  9. --border-color: #ddd;
  10. }
  11. body {
  12. font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  13. margin: 0;
  14. padding: 0;
  15. color: #333;
  16. background-color: #f8f9fa;
  17. }
  18. #pageContainer {
  19. width: 100%;
  20. min-height: 100vh;
  21. }
  22. /* 主体内容样式 */
  23. .mod-main {
  24. padding: 20px;
  25. max-width: 1400px;
  26. margin: 0 auto;
  27. }
  28. .main-inner {
  29. background: #fff;
  30. border-radius: 4px;
  31. box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  32. padding: 20px;
  33. }
  34. /* 表格样式 */
  35. .mod-table {
  36. width: 100%;
  37. border-collapse: separate;
  38. border-spacing: 15px;
  39. }
  40. .mod-table td {
  41. vertical-align: top;
  42. width: 30%;
  43. }
  44. .mod-table td.converter-col {
  45. width: 10%;
  46. }
  47. /* 面板样式 */
  48. .x-panel {
  49. border: 1px solid var(--border-color);
  50. border-radius: 4px;
  51. background: var(--panel-bg);
  52. margin-bottom: 15px;
  53. overflow: hidden;
  54. }
  55. .x-panel-title {
  56. background: #e9ecef;
  57. padding: 10px 15px;
  58. font-weight: bold;
  59. border-bottom: 1px solid var(--border-color);
  60. }
  61. .panel-content {
  62. padding: 15px;
  63. min-height: 200px;
  64. display: flex;
  65. flex-direction: column;
  66. justify-content: center;
  67. }
  68. /* 上传区域样式 */
  69. .upload-zone {
  70. text-align: center;
  71. min-height: 180px;
  72. display: flex;
  73. flex-direction: column;
  74. justify-content: center;
  75. align-items: center;
  76. }
  77. .upload-zone p {
  78. color: #666;
  79. line-height: 1.6;
  80. }
  81. .btn-upload {
  82. display: inline-block;
  83. padding: 6px 12px;
  84. margin: 5px;
  85. background-color: var(--primary-color);
  86. color: white;
  87. border-radius: 4px;
  88. cursor: pointer;
  89. transition: background-color 0.3s;
  90. }
  91. .btn-upload:hover {
  92. background-color: var(--hover-color);
  93. }
  94. .load-url, .paste-content {
  95. color: var(--primary-color);
  96. text-decoration: underline;
  97. cursor: pointer;
  98. margin: 0 10px;
  99. }
  100. /* 图片与SVG预览样式 */
  101. .svg-preview, .img-preview {
  102. max-width: 100%;
  103. max-height: 300px;
  104. margin-left: auto;
  105. margin-right: auto;
  106. display: block;
  107. }
  108. .preview-container {
  109. position: relative;
  110. width: 100%;
  111. text-align: center;
  112. }
  113. .preview-actions {
  114. margin-top: 10px;
  115. display: flex;
  116. justify-content: center;
  117. }
  118. .btn-change {
  119. background-color: #5a6268;
  120. padding: 5px 10px;
  121. font-size: 14px;
  122. }
  123. .btn-change:hover {
  124. background-color: #444a4e;
  125. }
  126. .svg-result {
  127. width: 100%;
  128. height: 300px;
  129. overflow: auto;
  130. background-color: transparent;
  131. }
  132. .svg-result svg {
  133. max-width: 100%;
  134. max-height: 280px;
  135. display: block;
  136. margin: 0 auto;
  137. }
  138. /* 面板有图像时移除背景图 */
  139. .x-panel.has-image {
  140. background-image: none;
  141. }
  142. /* 转换器列样式 */
  143. .converter-box {
  144. display: flex;
  145. flex-direction: column;
  146. justify-content: center;
  147. align-items: center;
  148. height: 100%;
  149. min-height: 200px;
  150. }
  151. .converter-inputs {
  152. width: 100%;
  153. margin-bottom: 20px;
  154. }
  155. .input-group {
  156. margin-bottom: 10px;
  157. display: flex;
  158. align-items: center;
  159. }
  160. .input-group label {
  161. width: 100px;
  162. text-align: right;
  163. padding-right: 10px;
  164. }
  165. .input-group input, .input-group select {
  166. flex: 1;
  167. padding: 6px;
  168. border: 1px solid var(--border-color);
  169. border-radius: 4px;
  170. }
  171. /* 转换按钮样式 */
  172. .btn-convert {
  173. display: block;
  174. width: 100%;
  175. padding: 10px 15px;
  176. background-color: var(--primary-color);
  177. color: white;
  178. font-weight: bold;
  179. border: none;
  180. border-radius: 4px;
  181. cursor: pointer;
  182. transition: background-color 0.3s;
  183. margin-top: 15px;
  184. }
  185. .btn-convert:hover {
  186. background-color: var(--hover-color);
  187. }
  188. /* 操作按钮容器 */
  189. .action-buttons {
  190. display: flex;
  191. gap: 10px;
  192. margin-top: 15px;
  193. }
  194. .action-buttons .btn-convert {
  195. flex: 3;
  196. margin-top: 0;
  197. }
  198. .action-buttons .btn-reset {
  199. flex: 2;
  200. background-color: #e0e0e0;
  201. color: #333;
  202. font-weight: bold;
  203. padding: 10px 15px;
  204. border: none;
  205. border-radius: 4px;
  206. cursor: pointer;
  207. transition: background-color 0.3s;
  208. }
  209. .action-buttons .btn-reset:hover {
  210. background-color: #c0c0c0;
  211. }
  212. /* 一般按钮样式 */
  213. .btn {
  214. padding: 8px 15px;
  215. background-color: var(--primary-color);
  216. color: white;
  217. font-weight: 500;
  218. border: none;
  219. border-radius: 4px;
  220. cursor: pointer;
  221. text-decoration: none;
  222. transition: background-color 0.3s;
  223. }
  224. .btn:hover {
  225. background-color: var(--hover-color);
  226. }
  227. .download-btn {
  228. text-align: center;
  229. margin-top: 15px;
  230. }
  231. /* 结果区域样式 */
  232. .result-zone {
  233. text-align: center;
  234. min-height: 180px;
  235. display: flex;
  236. flex-direction: column;
  237. justify-content: center;
  238. align-items: center;
  239. }
  240. .result-zone p {
  241. color: #666;
  242. }
  243. /* 错误信息样式 */
  244. .error-msg {
  245. background-color: #ffebee;
  246. color: #d32f2f;
  247. padding: 10px 15px;
  248. border-radius: 4px;
  249. margin: 10px 0;
  250. border-left: 4px solid #d32f2f;
  251. font-size: 14px;
  252. line-height: 1.5;
  253. }
  254. /* 警告信息样式 */
  255. .warning-msg {
  256. background-color: #fff8e1;
  257. color: #f57c00;
  258. padding: 10px 15px;
  259. border-radius: 4px;
  260. margin: 10px 0;
  261. border-left: 4px solid #f57c00;
  262. font-size: 14px;
  263. line-height: 1.5;
  264. }
  265. .error-msg ul, .warning-msg ul {
  266. margin: 5px 0 0 20px;
  267. padding: 0;
  268. }
  269. .error-suggestion, .warning-suggestion {
  270. font-style: italic;
  271. color: #666;
  272. margin-top: 5px;
  273. }
  274. /* 文件信息面板样式 */
  275. .file-info-panel {
  276. border: 1px solid var(--border-color);
  277. border-radius: 4px;
  278. padding: 15px;
  279. margin-bottom: 15px;
  280. background-color: #fff;
  281. }
  282. .file-info-panel h3 {
  283. margin-top: 0;
  284. margin-bottom: 10px;
  285. font-size: 16px;
  286. color: #333;
  287. border-bottom: 1px solid #eee;
  288. padding-bottom: 8px;
  289. }
  290. .info-table {
  291. width: 100%;
  292. border-collapse: collapse;
  293. }
  294. .info-table td {
  295. padding: 6px 0;
  296. border: none;
  297. }
  298. .info-label {
  299. font-weight: bold;
  300. width: 100px;
  301. color: #666;
  302. }
  303. .size-increase {
  304. color: var(--error-color);
  305. }
  306. .size-decrease {
  307. color: var(--success-color);
  308. }
  309. /* 自适应样式 */
  310. @media (max-width: 992px) {
  311. .mod-table {
  312. display: block;
  313. }
  314. .mod-table tr {
  315. display: flex;
  316. flex-direction: column;
  317. }
  318. .mod-table td {
  319. width: 100%;
  320. display: block;
  321. }
  322. .converter-box {
  323. flex-direction: row;
  324. min-height: auto;
  325. padding: 15px 0;
  326. }
  327. .converter-inputs {
  328. margin-bottom: 0;
  329. margin-right: 15px;
  330. }
  331. }
  332. /* 加载指示器样式 */
  333. .loading-overlay {
  334. position: fixed;
  335. top: 0;
  336. left: 0;
  337. right: 0;
  338. bottom: 0;
  339. background: rgba(0, 0, 0, 0.5);
  340. display: flex;
  341. justify-content: center;
  342. align-items: center;
  343. z-index: 1000;
  344. }
  345. .loading-container {
  346. background: white;
  347. padding: 20px;
  348. border-radius: 4px;
  349. text-align: center;
  350. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  351. max-width: 80%;
  352. width: 300px;
  353. }
  354. .loading-message {
  355. margin: 10px 0;
  356. color: #333;
  357. font-size: 16px;
  358. }
  359. .loading-spinner {
  360. border: 3px solid #f3f3f3;
  361. border-top: 3px solid #4285f4;
  362. border-radius: 50%;
  363. width: 30px;
  364. height: 30px;
  365. margin: 0 auto;
  366. animation: spin 1s linear infinite;
  367. }
  368. @keyframes spin {
  369. 0% { transform: rotate(0deg); }
  370. 100% { transform: rotate(360deg); }
  371. }
  372. .progress-bar {
  373. height: 10px;
  374. background: #f3f3f3;
  375. border-radius: 5px;
  376. margin-top: 10px;
  377. overflow: hidden;
  378. }
  379. .progress-fill {
  380. height: 100%;
  381. background: #4285f4;
  382. transition: width 0.3s;
  383. }
  384. /* 文件大小警告样式 */
  385. .file-size-warning {
  386. position: fixed;
  387. top: 50%;
  388. left: 50%;
  389. transform: translate(-50%, -50%);
  390. background: white;
  391. padding: 20px;
  392. border-radius: 4px;
  393. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  394. z-index: 1100;
  395. max-width: 90%;
  396. width: 400px;
  397. }
  398. .file-size-warning p:first-child {
  399. font-weight: bold;
  400. font-size: 18px;
  401. margin-top: 0;
  402. }
  403. .warning-actions {
  404. display: flex;
  405. justify-content: flex-end;
  406. margin-top: 20px;
  407. }
  408. .warning-actions .btn {
  409. margin-left: 10px;
  410. }
  411. .btn-cancel {
  412. background-color: #f5f5f5;
  413. color: #333;
  414. }
  415. .btn-continue {
  416. background-color: #ff5722;
  417. color: white;
  418. }
  419. /* 文件大小警告对话框样式 */
  420. .warning-dialog {
  421. position: fixed;
  422. top: 50%;
  423. left: 50%;
  424. transform: translate(-50%, -50%);
  425. background-color: #fff;
  426. border-radius: 8px;
  427. box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  428. padding: 20px;
  429. z-index: 9999;
  430. min-width: 300px;
  431. max-width: 450px;
  432. }
  433. .warning-content {
  434. margin-bottom: 20px;
  435. font-size: 14px;
  436. line-height: 1.5;
  437. color: #333;
  438. }
  439. .warning-actions {
  440. display: flex;
  441. justify-content: flex-end;
  442. gap: 10px;
  443. }
  444. .btn-cancel {
  445. background-color: #f0f0f0;
  446. color: #333;
  447. border: 1px solid #ddd;
  448. }
  449. .btn-continue {
  450. background-color: #F44336;
  451. color: white;
  452. border: 1px solid #D32F2F;
  453. }
  454. .btn {
  455. padding: 8px 16px;
  456. border-radius: 4px;
  457. cursor: pointer;
  458. font-size: 14px;
  459. transition: background-color 0.2s;
  460. }
  461. .btn:hover {
  462. opacity: 0.9;
  463. }