index.css 23 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327
  1. /* 导入Bootstrap样式 */
  2. @import url("../static/css/bootstrap.min.css");
  3. /* 全局样式 */
  4. * {
  5. margin: 0;
  6. padding: 0;
  7. box-sizing: border-box;
  8. }
  9. body {
  10. font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  11. background: #fff !important;
  12. color: #333 !important;
  13. line-height: 1.4;
  14. }
  15. /* Panel样式 */
  16. .panel {
  17. margin-bottom: 20px;
  18. background-color: #fff;
  19. border: 1px solid transparent;
  20. border-radius: 4px;
  21. -webkit-box-shadow: 0 1px 1px rgba(0,0,0,.05);
  22. box-shadow: 0 1px 1px rgba(0,0,0,.05);
  23. }
  24. .panel-default {
  25. border-color: #ddd;
  26. }
  27. .panel-heading {
  28. padding: 10px 15px;
  29. border-bottom: 1px solid transparent;
  30. border-top-left-radius: 3px;
  31. border-top-right-radius: 3px;
  32. color: #333;
  33. background-color: #f5f5f5;
  34. border-color: #ddd;
  35. }
  36. .panel-title {
  37. margin-top: 0;
  38. margin-bottom: 0;
  39. font-size: 16px;
  40. color: inherit;
  41. }
  42. .x-a-high {
  43. color: #337ab7;
  44. text-decoration: none;
  45. }
  46. .x-a-high:hover {
  47. color: #23527c;
  48. text-decoration: underline;
  49. }
  50. .nav-icon {
  51. margin-right: 3px;
  52. }
  53. /* 主容器样式 */
  54. .container {
  55. max-width: 1200px;
  56. margin: 0 auto;
  57. padding: 20px;
  58. background-color: #fff;
  59. }
  60. /* 新版正则分类区域美化 */
  61. .category-section {
  62. background: #fff;
  63. border-radius: 10px;
  64. box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  65. margin-bottom: 24px;
  66. padding: 18px 24px 12px 24px;
  67. }
  68. .category-title {
  69. font-size: 18px;
  70. font-weight: bold;
  71. color: #333;
  72. margin-bottom: 14px;
  73. letter-spacing: 1px;
  74. }
  75. .category-btn-group {
  76. display: flex;
  77. flex-wrap: wrap;
  78. gap: 12px 16px;
  79. }
  80. .regex-item {
  81. background: #f7f8fa;
  82. border: 1px solid #e3e6eb;
  83. border-radius: 6px;
  84. padding: 8px 18px;
  85. font-size: 15px;
  86. color: #1976d2;
  87. cursor: pointer;
  88. margin-bottom: 8px;
  89. transition: background 0.2s, box-shadow 0.2s, color 0.2s;
  90. outline: none;
  91. }
  92. .regex-item:hover, .regex-item:focus {
  93. background: #e3f2fd;
  94. color: #0d47a1;
  95. box-shadow: 0 2px 8px rgba(25, 118, 210, 0.08);
  96. border-color: #90caf9;
  97. }
  98. @media (max-width: 600px) {
  99. .category-section {
  100. padding: 12px 8px 8px 8px;
  101. }
  102. .category-title {
  103. font-size: 16px;
  104. }
  105. .regex-item {
  106. font-size: 13px;
  107. padding: 6px 10px;
  108. }
  109. }
  110. /* 正则项目和工具提示样式 */
  111. .regex-item {
  112. padding: 0.5rem;
  113. background-color: #f8f9fa;
  114. border: 1px solid #e9ecef;
  115. border-radius: 4px;
  116. cursor: pointer;
  117. font-size: 0.9rem;
  118. transition: all 0.2s ease;
  119. text-align: center;
  120. position: relative;
  121. }
  122. .regex-item:hover {
  123. background-color: #3498db;
  124. color: #fff;
  125. transform: translateY(-1px);
  126. box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  127. }
  128. /* 工具提示气泡 */
  129. .regex-item::after {
  130. content: "点击获取正则表达式";
  131. position: absolute;
  132. bottom: 100%;
  133. left: 50%;
  134. transform: translateX(-50%);
  135. padding: 0.4rem 0.8rem;
  136. background-color: #2c3e50;
  137. color: #fff;
  138. font-size: 0.8rem;
  139. border-radius: 4px;
  140. white-space: nowrap;
  141. opacity: 0;
  142. visibility: hidden;
  143. transition: all 0.2s ease;
  144. z-index: 10;
  145. pointer-events: none;
  146. }
  147. /* 工具提示三角形 */
  148. .regex-item::before {
  149. content: "";
  150. position: absolute;
  151. bottom: 100%;
  152. left: 50%;
  153. transform: translateX(-50%);
  154. border: 6px solid transparent;
  155. border-top-color: #2c3e50;
  156. opacity: 0;
  157. visibility: hidden;
  158. transition: all 0.2s ease;
  159. z-index: 10;
  160. pointer-events: none;
  161. }
  162. /* 显示工具提示 */
  163. .regex-item:hover::after {
  164. opacity: 1;
  165. visibility: visible;
  166. bottom: calc(100% + 10px);
  167. }
  168. .regex-item:hover::before {
  169. opacity: 1;
  170. visibility: visible;
  171. bottom: calc(100% + 4px);
  172. }
  173. /* 模态框样式 */
  174. .modal {
  175. display: none;
  176. position: fixed;
  177. top: 0;
  178. left: 0;
  179. width: 100%;
  180. height: 100%;
  181. background-color: rgba(0,0,0,0.5);
  182. z-index: 1000;
  183. }
  184. .modal-content {
  185. position: relative;
  186. background-color: #fff;
  187. margin: 2rem auto;
  188. padding: 1.5rem;
  189. width: 700px;
  190. max-width: 800px;
  191. border-radius: 8px;
  192. box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  193. max-height: calc(100vh - 4rem);
  194. overflow-y: auto;
  195. }
  196. .close {
  197. position: absolute;
  198. right: 1rem;
  199. top: 1rem;
  200. font-size: 1.5rem;
  201. cursor: pointer;
  202. color: #666;
  203. }
  204. .close:hover {
  205. color: #e74c3c;
  206. }
  207. .regex-versions {
  208. display: grid;
  209. grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  210. gap: 1rem;
  211. margin: 1rem 0;
  212. }
  213. .version {
  214. background-color: #f8f9fa;
  215. padding: 0.8rem;
  216. border-radius: 4px;
  217. }
  218. .version h3 {
  219. font-size: 0.9rem;
  220. margin-bottom: 0.5rem;
  221. color: #2c3e50;
  222. }
  223. pre {
  224. background-color: #fff;
  225. padding: 0.5rem;
  226. border-radius: 4px;
  227. border: 1px solid #e9ecef;
  228. font-size: 0.85rem;
  229. overflow-x: auto;
  230. }
  231. .copy-btn {
  232. margin-top: 0.5rem;
  233. padding: 0.3rem 0.8rem;
  234. background-color: #3498db;
  235. color: #fff;
  236. border: none;
  237. border-radius: 4px;
  238. cursor: pointer;
  239. font-size: 0.85rem;
  240. transition: background-color 0.2s;
  241. }
  242. .copy-btn:hover {
  243. background-color: #2980b9;
  244. }
  245. .regex-description {
  246. margin-top: 1rem;
  247. padding-top: 1rem;
  248. border-top: 1px solid #e9ecef;
  249. }
  250. .regex-description h3 {
  251. font-size: 0.9rem;
  252. margin-bottom: 0.5rem;
  253. color: #2c3e50;
  254. }
  255. .regex-description p {
  256. font-size: 0.9rem;
  257. color: #666;
  258. line-height: 1.5;
  259. }
  260. /* 响应式调整 */
  261. @media (max-width: 1024px) {
  262. .regex-categories {
  263. column-count: 2;
  264. }
  265. }
  266. @media (max-width: 768px) {
  267. .regex-categories {
  268. column-count: 1;
  269. }
  270. .regex-list {
  271. grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  272. }
  273. .regex-versions {
  274. grid-template-columns: 1fr;
  275. }
  276. .modal-content {
  277. width: 95%;
  278. margin: 1rem auto;
  279. }
  280. .subtitle {
  281. display: none;
  282. }
  283. .container {
  284. padding: 0 0.3rem;
  285. }
  286. /* 移动端工具提示调整 */
  287. .regex-item::after {
  288. display: none;
  289. }
  290. .regex-item::before {
  291. display: none;
  292. }
  293. }
  294. .search-container {
  295. width: 100%;
  296. padding: 10px 0;
  297. display: flex;
  298. justify-content: center;
  299. margin-bottom: 10px;
  300. }
  301. .search-box {
  302. position: relative;
  303. width: 90%;
  304. }
  305. .search-box input {
  306. width: 100%;
  307. padding: 15px 45px 15px 20px;
  308. border: 2px solid #3498db;
  309. border-radius: 25px;
  310. font-size: 16px;
  311. transition: all 0.3s ease;
  312. outline: none;
  313. background-color: rgba(255, 255, 255, 0.9);
  314. box-shadow: 0 4px 6px rgba(52, 152, 219, 0.1);
  315. }
  316. .search-box input:focus {
  317. border-color: #2980b9;
  318. box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
  319. background-color: #ffffff;
  320. transform: translateY(-1px);
  321. }
  322. .search-box input::placeholder {
  323. color: #95a5a6;
  324. }
  325. .search-box .search-icon {
  326. position: absolute;
  327. right: 20px;
  328. top: 50%;
  329. transform: translateY(-50%);
  330. color: #3498db;
  331. font-size: 20px;
  332. pointer-events: none;
  333. transition: all 0.3s ease;
  334. }
  335. .search-box input:focus + .search-icon {
  336. color: #2980b9;
  337. }
  338. /* 搜索结果高亮样式 */
  339. .regex-item.highlight {
  340. background-color: #fff3cd;
  341. border-color: #3498db;
  342. box-shadow: 0 2px 4px rgba(52, 152, 219, 0.15);
  343. transform: translateY(-1px);
  344. }
  345. .regex-item.hidden {
  346. display: none;
  347. }
  348. /* 响应式调整 */
  349. @media (max-width: 768px) {
  350. .search-box {
  351. width: 90%;
  352. }
  353. .search-container {
  354. padding: 15px 0;
  355. }
  356. }
  357. /* 正则可视化调试区域样式 */
  358. .regex-visual-debugger {
  359. background: #fff;
  360. border-radius: 8px;
  361. box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  362. padding: 1.2rem 1rem 1rem 1rem;
  363. margin-bottom: 1.2rem;
  364. }
  365. .regex-visual-debugger h2 {
  366. font-size: 1.1rem;
  367. color: #2563eb;
  368. margin-bottom: 0.8rem;
  369. border-left: 4px solid #2563eb;
  370. padding-left: 0.6rem;
  371. }
  372. .visual-debugger-form {
  373. display: flex;
  374. gap: 0.5rem;
  375. margin-bottom: 0.5rem;
  376. }
  377. .visual-debugger-form input[type="text"] {
  378. flex: 1;
  379. padding: 0.5rem 0.8rem;
  380. border: 1.5px solid #3498db;
  381. border-radius: 4px;
  382. font-size: 1rem;
  383. background: #f8f9fa;
  384. transition: border-color 0.2s;
  385. }
  386. .visual-debugger-form input[type="text"]:focus {
  387. border-color: #2563eb;
  388. background: #fff;
  389. }
  390. #visualTestText {
  391. width: 100%;
  392. min-height: 60px;
  393. font-size: 1rem;
  394. border: 1.5px solid #e9ecef;
  395. border-radius: 4px;
  396. padding: 0.6rem 0.8rem;
  397. margin-bottom: 0.5rem;
  398. resize: vertical;
  399. transition: border-color 0.2s;
  400. }
  401. #visualTestText:focus {
  402. border-color: #2563eb;
  403. background: #fff;
  404. }
  405. .match-position {
  406. color: #888;
  407. font-size: 12px;
  408. }
  409. .visual-debugger-actions {
  410. display: flex;
  411. align-items: center;
  412. gap: 1rem;
  413. margin-bottom: 0.5rem;
  414. }
  415. #visualTestBtn {
  416. background: #3498db;
  417. color: #fff;
  418. border: none;
  419. border-radius: 4px;
  420. padding: 0.4rem 1.2rem;
  421. font-size: 1rem;
  422. cursor: pointer;
  423. transition: background 0.2s;
  424. }
  425. #visualTestBtn:hover {
  426. background: #2563eb;
  427. }
  428. .visual-error-msg {
  429. color: #e74c3c;
  430. font-size: 0.95rem;
  431. min-width: 120px;
  432. }
  433. .visual-result {
  434. background: #f8f9fa;
  435. border: 1px solid #e9ecef;
  436. border-radius: 4px;
  437. min-height: 36px;
  438. padding: 0.7rem 0.8rem;
  439. font-size: 1rem;
  440. color: #222;
  441. margin-top: 0.2rem;
  442. word-break: break-all;
  443. }
  444. .visual-result .visual-match {
  445. background: #fff3cd;
  446. color: #d35400;
  447. border-radius: 3px;
  448. padding: 0 2px;
  449. font-weight: bold;
  450. }
  451. .visual-group-list {
  452. display: block;
  453. margin-top: 2px;
  454. font-size: 0.92em;
  455. }
  456. .visual-group {
  457. background: #e3f6fc;
  458. color: #0077b6;
  459. border-radius: 2px;
  460. margin-right: 4px;
  461. padding: 0 3px;
  462. font-weight: normal;
  463. }
  464. .visual-debugger-form select#visualRegexPreset {
  465. min-width: 180px;
  466. max-width: 260px;
  467. padding: 0.5rem 0.8rem;
  468. border: 1.5px solid #3498db;
  469. border-radius: 4px;
  470. font-size: 1rem;
  471. background: #f8f9fa;
  472. transition: border-color 0.2s;
  473. margin-right: 0.5rem;
  474. }
  475. .visual-debugger-form select#visualRegexPreset:focus {
  476. border-color: #2563eb;
  477. background: #fff;
  478. }
  479. .visual-flags-group {
  480. display: flex;
  481. align-items: center;
  482. gap: 0.5rem;
  483. margin-left: 0.5rem;
  484. }
  485. .flag-btn {
  486. display: flex;
  487. align-items: center;
  488. background: #f8f9fa;
  489. border: 1.5px solid #3498db;
  490. border-radius: 4px;
  491. padding: 0.2rem 0.7rem;
  492. font-size: 1rem;
  493. cursor: pointer;
  494. transition: background 0.2s, border-color 0.2s;
  495. margin-right: 0.2rem;
  496. user-select: none;
  497. position: relative;
  498. }
  499. .flag-btn input[type="checkbox"] {
  500. margin-right: 3px;
  501. }
  502. .flag-btn:hover {
  503. background: #e6f0fa;
  504. border-color: #2563eb;
  505. }
  506. .flag-btn input[type="checkbox"]:checked + span,
  507. .flag-btn input[type="checkbox"]:checked {
  508. font-weight: bold;
  509. color: #2563eb;
  510. }
  511. .flag-desc {
  512. color: #888;
  513. font-size: 0.92em;
  514. margin-left: 0.5rem;
  515. }
  516. /* 基础样式 */
  517. * {
  518. box-sizing: border-box;
  519. }
  520. body {
  521. font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  522. margin: 0;
  523. padding: 0;
  524. background-color: #f8f9fa;
  525. color: #333;
  526. line-height: 1.6;
  527. }
  528. /* 头部样式 */
  529. .header {
  530. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  531. color: white;
  532. padding: 20px 0;
  533. box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  534. }
  535. .logo {
  536. display: flex;
  537. align-items: center;
  538. max-width: 1200px;
  539. margin: 0 auto;
  540. padding: 0 20px;
  541. gap: 12px;
  542. }
  543. .logo h3 {
  544. margin: 0;
  545. font-size: 24px;
  546. font-weight: 600;
  547. }
  548. .logo .subtitle {
  549. color: rgba(255, 255, 255, 0.9);
  550. font-size: 14px;
  551. margin-left: auto;
  552. }
  553. .tool-market-badge {
  554. background: #ff6b6b;
  555. color: white;
  556. padding: 2px 8px;
  557. border-radius: 10px;
  558. font-size: 12px;
  559. margin-left: 5px;
  560. }
  561. /* 容器样式 */
  562. .container {
  563. max-width: 1200px;
  564. margin: 0 auto;
  565. padding: 20px;
  566. }
  567. /* Tab切换样式 */
  568. .tab-container {
  569. background: white;
  570. border: 1px solid #ddd;
  571. border-radius: 4px;
  572. margin-bottom: 20px;
  573. }
  574. .tab-header {
  575. display: flex;
  576. background: #f5f5f5;
  577. border-bottom: 1px solid #ddd;
  578. border-top-left-radius: 3px;
  579. border-top-right-radius: 3px;
  580. }
  581. .tab-btn {
  582. flex: 1;
  583. padding: 12px 16px;
  584. border: none;
  585. background: transparent;
  586. cursor: pointer;
  587. font-size: 14px;
  588. color: #666;
  589. transition: all 0.2s ease;
  590. position: relative;
  591. }
  592. .tab-btn:hover {
  593. background: #e6e6e6;
  594. color: #337ab7;
  595. }
  596. .tab-btn.active {
  597. background: #fff !important;
  598. color: #337ab7 !important;
  599. border-bottom: 2px solid #337ab7 !important;
  600. }
  601. .tab-content {
  602. display: none;
  603. padding: 20px;
  604. min-height: 500px;
  605. background: #fff;
  606. }
  607. .tab-content.active {
  608. display: block;
  609. }
  610. /* 正则可视化调试区域 */
  611. .regex-visual-debugger {
  612. background: #f8f9fa;
  613. border-radius: 8px;
  614. padding: 20px;
  615. margin-bottom: 30px;
  616. border: 1px solid #e9ecef;
  617. }
  618. .regex-visual-debugger h2 {
  619. margin-top: 0;
  620. color: #495057;
  621. font-size: 20px;
  622. margin-bottom: 20px;
  623. }
  624. .visual-debugger-form {
  625. display: flex;
  626. gap: 10px;
  627. margin-bottom: 15px;
  628. flex-wrap: wrap;
  629. align-items: center;
  630. }
  631. .visual-debugger-form select,
  632. .visual-debugger-form input[type="text"] {
  633. padding: 8px 12px;
  634. border: 1px solid #ced4da;
  635. border-radius: 4px;
  636. font-size: 14px;
  637. }
  638. .visual-debugger-form select {
  639. min-width: 200px;
  640. }
  641. .visual-debugger-form input[type="text"] {
  642. flex: 1;
  643. min-width: 300px;
  644. }
  645. .visual-flags-group {
  646. display: flex;
  647. gap: 10px;
  648. align-items: center;
  649. }
  650. .flag-btn {
  651. display: flex;
  652. align-items: center;
  653. gap: 5px;
  654. padding: 5px 10px;
  655. border: 1px solid #ced4da;
  656. border-radius: 4px;
  657. background: white;
  658. cursor: pointer;
  659. font-size: 14px;
  660. transition: all 0.3s ease;
  661. }
  662. .flag-btn:hover {
  663. background: #f8f9fa;
  664. }
  665. .flag-btn input[type="checkbox"] {
  666. margin: 0;
  667. }
  668. .flag-desc {
  669. font-size: 12px;
  670. color: #6c757d;
  671. margin-left: 10px;
  672. }
  673. .visual-debugger-form textarea {
  674. width: 100%;
  675. padding: 10px;
  676. border: 1px solid #ced4da;
  677. border-radius: 4px;
  678. font-family: 'Courier New', monospace;
  679. font-size: 14px;
  680. resize: vertical;
  681. }
  682. .visual-debugger-actions {
  683. display: flex;
  684. gap: 10px;
  685. align-items: center;
  686. margin-bottom: 15px;
  687. }
  688. .visual-debugger-actions button {
  689. padding: 8px 16px;
  690. background: #667eea;
  691. color: white;
  692. border: none;
  693. border-radius: 4px;
  694. cursor: pointer;
  695. font-size: 14px;
  696. transition: background 0.3s ease;
  697. }
  698. .visual-debugger-actions button:hover {
  699. background: #5a6fd8;
  700. }
  701. .visual-error-msg {
  702. color: #dc3545;
  703. font-size: 14px;
  704. }
  705. .visual-result {
  706. background: white;
  707. border: 1px solid #e9ecef;
  708. border-radius: 4px;
  709. padding: 15px;
  710. min-height: 100px;
  711. }
  712. /* 搜索框样式 */
  713. .search-container {
  714. margin-bottom: 30px;
  715. }
  716. .search-box {
  717. position: relative;
  718. max-width: 1200px;
  719. margin: 0 auto;
  720. }
  721. .search-box input {
  722. width: 100%;
  723. padding: 12px 40px 12px 16px;
  724. border: 2px solid #e9ecef;
  725. border-radius: 25px;
  726. font-size: 16px;
  727. transition: border-color 0.3s ease;
  728. }
  729. .search-box input:focus {
  730. outline: none;
  731. border-color: #667eea;
  732. }
  733. .search-icon {
  734. position: absolute;
  735. right: 15px;
  736. top: 50%;
  737. transform: translateY(-50%);
  738. font-size: 18px;
  739. color: #6c757d;
  740. }
  741. /* 正则表达式分类样式 */
  742. .regex-categories {
  743. display: grid;
  744. gap: 30px;
  745. }
  746. .category {
  747. background: white;
  748. border-radius: 8px;
  749. padding: 20px;
  750. box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  751. }
  752. .category h2 {
  753. margin-top: 0;
  754. color: #495057;
  755. font-size: 18px;
  756. margin-bottom: 15px;
  757. padding-bottom: 10px;
  758. border-bottom: 2px solid #e9ecef;
  759. }
  760. .regex-list {
  761. display: grid;
  762. grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  763. gap: 10px;
  764. }
  765. .regex-item {
  766. padding: 12px 16px;
  767. background: #f8f9fa;
  768. border: 1px solid #e9ecef;
  769. border-radius: 6px;
  770. cursor: pointer;
  771. transition: all 0.3s ease;
  772. font-size: 14px;
  773. text-align: center;
  774. }
  775. .regex-item:hover {
  776. background: #667eea;
  777. color: white;
  778. transform: translateY(-2px);
  779. box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
  780. }
  781. /* 模态框样式 */
  782. .modal {
  783. display: none;
  784. position: fixed;
  785. z-index: 1000;
  786. left: 0;
  787. top: 0;
  788. width: 100%;
  789. height: 100%;
  790. background-color: rgba(0,0,0,0.5);
  791. }
  792. .modal-content {
  793. background-color: white;
  794. margin: 5% auto;
  795. padding: 20px;
  796. border-radius: 8px;
  797. width: 90%;
  798. max-width: 800px;
  799. max-height: 80vh;
  800. overflow-y: auto;
  801. position: relative;
  802. }
  803. .close {
  804. position: absolute;
  805. right: 20px;
  806. top: 15px;
  807. font-size: 28px;
  808. font-weight: bold;
  809. cursor: pointer;
  810. color: #aaa;
  811. }
  812. .close:hover {
  813. color: #000;
  814. }
  815. .regex-versions {
  816. display: grid;
  817. grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  818. gap: 20px;
  819. margin-bottom: 20px;
  820. }
  821. .version {
  822. background: #f8f9fa;
  823. padding: 15px;
  824. border-radius: 6px;
  825. border: 1px solid #e9ecef;
  826. }
  827. .version h3 {
  828. margin-top: 0;
  829. color: #495057;
  830. font-size: 16px;
  831. margin-bottom: 10px;
  832. }
  833. .version pre {
  834. background: #2d3748;
  835. color: #e2e8f0;
  836. padding: 10px;
  837. border-radius: 4px;
  838. font-size: 13px;
  839. overflow-x: auto;
  840. margin-bottom: 10px;
  841. }
  842. .copy-btn {
  843. background: #667eea;
  844. color: white;
  845. border: none;
  846. padding: 6px 12px;
  847. border-radius: 4px;
  848. cursor: pointer;
  849. font-size: 12px;
  850. transition: background 0.3s ease;
  851. }
  852. .copy-btn:hover {
  853. background: #5a6fd8;
  854. }
  855. .regex-description {
  856. background: #f8f9fa;
  857. padding: 15px;
  858. border-radius: 6px;
  859. border-left: 4px solid #667eea;
  860. }
  861. .regex-description h3 {
  862. margin-top: 0;
  863. color: #495057;
  864. font-size: 16px;
  865. margin-bottom: 10px;
  866. }
  867. /* 旧版样式 - 开始 */
  868. html {
  869. font-size: 14px;
  870. }
  871. .pannel-select {
  872. position: absolute;
  873. right: 0;
  874. top: 0;
  875. width: 255px;
  876. height: 30px;
  877. }
  878. .reglist_select {
  879. padding: 0 0;
  880. height: 24px;
  881. }
  882. .reg_link {
  883. display: inline-block;
  884. float: right;
  885. text-align: right;
  886. font-size: 12px;
  887. margin-top: 4px;
  888. }
  889. .reg_pre {
  890. border: none;
  891. background: transparent;
  892. }
  893. .reg_reg_input {
  894. resize: none;
  895. }
  896. .reg_textarea {
  897. padding: 0;
  898. width: 100%;
  899. resize: none;
  900. font: 100% "courier new", monospace;
  901. }
  902. #srcWrapper {
  903. padding: 12px;
  904. }
  905. .wrapper #srcBackground {
  906. padding: 0;
  907. }
  908. .mod-regexp {
  909. margin: 0 auto;
  910. padding: 0;
  911. background: #FFF;
  912. }
  913. #srcWrapper {
  914. background: #fff;
  915. border: 1px solid #ccc;
  916. min-height: 50px;
  917. position: relative;
  918. border-radius: 4px;
  919. -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
  920. box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
  921. -webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
  922. -o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
  923. transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
  924. }
  925. #srcBackground {
  926. padding: 4px;
  927. margin: 0;
  928. position: absolute;
  929. z-index: 1;
  930. width: 100%;
  931. word-break: break-all;
  932. line-height: 14px;
  933. }
  934. #srcBackground i, #srcBackground b {
  935. font: 100% "courier new", monospace;
  936. font-style: normal;
  937. font-weight: normal;
  938. font-size: 14px;
  939. margin: 0;
  940. padding: 0;
  941. background: #fff;
  942. color: #fff;
  943. }
  944. #srcBackground b {
  945. background: #dd0;
  946. color: #dd0;
  947. }
  948. #srcCode {
  949. background: transparent;
  950. margin: 0;
  951. border: none;
  952. font-size: 14px;
  953. position: relative;
  954. z-index: 2;
  955. outline: none;
  956. overflow-y: hidden;
  957. }
  958. #rstCount {
  959. color: #f00;
  960. }
  961. #rstCode {
  962. padding: 3px;
  963. }
  964. #regTip {
  965. font-size: 12px;
  966. color: #d00;
  967. display: none;
  968. }
  969. .x-tip {
  970. font-size: 12px;
  971. color: #00b;
  972. }
  973. .ui-po-r {
  974. position: relative;
  975. }
  976. .ui-mb-20 {
  977. margin-bottom: 20px;
  978. }
  979. .ui-mt-20 {
  980. margin-top: 20px;
  981. }
  982. .panel-subtitle {
  983. font-size: 16px;
  984. color: #333;
  985. margin-bottom: 10px;
  986. }
  987. .wrapper {
  988. background: white;
  989. border-radius: 8px;
  990. }
  991. .panel-body {
  992. padding: 20px;
  993. }
  994. .table {
  995. width: 100%;
  996. border-collapse: collapse;
  997. margin-bottom: 20px;
  998. }
  999. .table th,
  1000. .table td {
  1001. padding: 8px;
  1002. text-align: left;
  1003. border-bottom: 1px solid #ddd;
  1004. }
  1005. .table th {
  1006. background-color: #f8f9fa;
  1007. font-weight: 600;
  1008. }
  1009. .table-striped tbody tr:nth-child(odd) {
  1010. background-color: #f8f9fa;
  1011. }
  1012. .table-hover tbody tr:hover {
  1013. background-color: #e9ecef;
  1014. }
  1015. .table-bordered {
  1016. border: 1px solid #dee2e6;
  1017. }
  1018. .table-bordered th,
  1019. .table-bordered td {
  1020. border: 1px solid #dee2e6;
  1021. }
  1022. .table-condensed th,
  1023. .table-condensed td {
  1024. padding: 5px;
  1025. }
  1026. .active {
  1027. background: #fff !important;
  1028. color: #337ab7 !important;
  1029. border-color: #337ab7 !important;
  1030. }
  1031. .num {
  1032. width: 60px;
  1033. text-align: center;
  1034. }
  1035. .content {
  1036. word-break: break-all;
  1037. }
  1038. .index {
  1039. width: 120px;
  1040. text-align: center;
  1041. }
  1042. /* 旧版样式 - 结束 */
  1043. /* 响应式设计 */
  1044. @media (max-width: 768px) {
  1045. .container {
  1046. padding: 10px;
  1047. }
  1048. .logo {
  1049. flex-direction: column;
  1050. gap: 10px;
  1051. text-align: center;
  1052. }
  1053. .logo .subtitle {
  1054. margin-left: 0;
  1055. }
  1056. .visual-debugger-form {
  1057. flex-direction: column;
  1058. }
  1059. .visual-debugger-form select,
  1060. .visual-debugger-form input[type="text"] {
  1061. width: 100%;
  1062. min-width: auto;
  1063. }
  1064. .visual-flags-group {
  1065. flex-wrap: wrap;
  1066. }
  1067. .regex-list {
  1068. grid-template-columns: 1fr;
  1069. }
  1070. .regex-versions {
  1071. grid-template-columns: 1fr;
  1072. }
  1073. .modal-content {
  1074. width: 95%;
  1075. margin: 2% auto;
  1076. }
  1077. .pannel-select {
  1078. position: static;
  1079. width: 100%;
  1080. margin-bottom: 10px;
  1081. }
  1082. .reglist_select {
  1083. width: 100%;
  1084. height: auto;
  1085. }
  1086. .reg_link {
  1087. float: none;
  1088. display: block;
  1089. margin-top: 10px;
  1090. }
  1091. }
  1092. /* 隐藏类 */
  1093. .hidden {
  1094. display: none !important;
  1095. }
  1096. /* 加载动画 */
  1097. .loading {
  1098. display: inline-block;
  1099. width: 20px;
  1100. height: 20px;
  1101. border: 3px solid #f3f3f3;
  1102. border-top: 3px solid #667eea;
  1103. border-radius: 50%;
  1104. animation: spin 1s linear infinite;
  1105. }
  1106. @keyframes spin {
  1107. 0% { transform: rotate(0deg); }
  1108. 100% { transform: rotate(360deg); }
  1109. }
  1110. /* 成功/错误提示 */
  1111. .success {
  1112. color: #28a745;
  1113. }
  1114. .error {
  1115. color: #dc3545;
  1116. }
  1117. /* 滚动条样式 */
  1118. ::-webkit-scrollbar {
  1119. width: 8px;
  1120. height: 8px;
  1121. }
  1122. ::-webkit-scrollbar-track {
  1123. background: #f1f1f1;
  1124. border-radius: 4px;
  1125. }
  1126. ::-webkit-scrollbar-thumb {
  1127. background: #c1c1c1;
  1128. border-radius: 4px;
  1129. }
  1130. ::-webkit-scrollbar-thumb:hover {
  1131. background: #a8a8a8;
  1132. }
  1133. /* 移除所有蓝色背景色 */
  1134. [style*="background: #1677ff"],
  1135. [style*="background-color: #1677ff"],
  1136. [style*="background: #1890ff"],
  1137. [style*="background-color: #1890ff"] {
  1138. background: #fff !important;
  1139. background-color: #fff !important;
  1140. }
  1141. /* 正则输入框和文本内容输入框固定高度 */
  1142. .visual-regex-input,
  1143. .visual-test-text,
  1144. #regText,
  1145. #srcCode {
  1146. height: 44px;
  1147. min-height: 44px;
  1148. max-height: 200px;
  1149. box-sizing: border-box;
  1150. resize: vertical;
  1151. line-height: 1.6;
  1152. }
  1153. .r-index {
  1154. width: 160px;;
  1155. }