| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461 |
- /* 全局样式 */
- * {
- margin: 0;
- padding: 0;
- box-sizing: border-box;
- }
- body {
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
- background-color: #f5f6fa;
- color: #2c3e50;
- line-height: 1.4;
- }
- /* 头部样式 */
- .header {
- background-color: #fff;
- padding: 0.8rem 1.5rem;
- box-shadow: 0 2px 4px rgba(0,0,0,0.1);
- position: sticky;
- top: 0;
- z-index: 100;
- }
- .logo {
- display: flex;
- align-items: center;
- gap: 0.8rem;
- }
- .logo h1 {
- font-size: 1.2rem;
- margin: 0;
- }
- .subtitle {
- color: #3498db;
- font-size: 0.9rem;
- margin-left: 0.5rem;
- padding: 0.2rem 0.5rem;
- background-color: rgba(52, 152, 219, 0.1);
- border-radius: 4px;
- }
- /* 主容器样式 */
- .container {
- max-width: 1200px;
- margin: 0.5rem auto;
- padding: 0 0.5rem;
- }
- /* 正则分类样式 */
- .regex-categories {
- column-count: 3;
- column-gap: 0.5rem;
- margin: 0 auto;
- }
- .category {
- background: #fff;
- border-radius: 8px;
- padding: 0.8rem;
- box-shadow: 0 1px 3px rgba(0,0,0,0.1);
- break-inside: avoid;
- margin-bottom: 0.5rem;
- page-break-inside: avoid;
- -webkit-column-break-inside: avoid;
- }
- .category h2 {
- font-size: 1rem;
- color: #2c3e50;
- margin-bottom: 0.5rem;
- padding-bottom: 0.3rem;
- border-bottom: 2px solid #3498db;
- }
- .regex-list {
- display: grid;
- grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
- gap: 0.5rem;
- }
- /* 正则项目和工具提示样式 */
- .regex-item {
- padding: 0.5rem;
- background-color: #f8f9fa;
- border: 1px solid #e9ecef;
- border-radius: 4px;
- cursor: pointer;
- font-size: 0.9rem;
- transition: all 0.2s ease;
- text-align: center;
- position: relative;
- }
- .regex-item:hover {
- background-color: #3498db;
- color: #fff;
- transform: translateY(-1px);
- box-shadow: 0 2px 4px rgba(0,0,0,0.1);
- }
- /* 工具提示气泡 */
- .regex-item::after {
- content: "点击获取正则表达式";
- position: absolute;
- bottom: 100%;
- left: 50%;
- transform: translateX(-50%);
- padding: 0.4rem 0.8rem;
- background-color: #2c3e50;
- color: #fff;
- font-size: 0.8rem;
- border-radius: 4px;
- white-space: nowrap;
- opacity: 0;
- visibility: hidden;
- transition: all 0.2s ease;
- z-index: 10;
- pointer-events: none;
- }
- /* 工具提示三角形 */
- .regex-item::before {
- content: "";
- position: absolute;
- bottom: 100%;
- left: 50%;
- transform: translateX(-50%);
- border: 6px solid transparent;
- border-top-color: #2c3e50;
- opacity: 0;
- visibility: hidden;
- transition: all 0.2s ease;
- z-index: 10;
- pointer-events: none;
- }
- /* 显示工具提示 */
- .regex-item:hover::after {
- opacity: 1;
- visibility: visible;
- bottom: calc(100% + 10px);
- }
- .regex-item:hover::before {
- opacity: 1;
- visibility: visible;
- bottom: calc(100% + 4px);
- }
- /* 模态框样式 */
- .modal {
- display: none;
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- background-color: rgba(0,0,0,0.5);
- z-index: 1000;
- }
- .modal-content {
- position: relative;
- background-color: #fff;
- margin: 2rem auto;
- padding: 1.5rem;
- width: 700px;
- max-width: 800px;
- border-radius: 8px;
- box-shadow: 0 4px 6px rgba(0,0,0,0.1);
- max-height: calc(100vh - 4rem);
- overflow-y: auto;
- }
- .close {
- position: absolute;
- right: 1rem;
- top: 1rem;
- font-size: 1.5rem;
- cursor: pointer;
- color: #666;
- }
- .close:hover {
- color: #e74c3c;
- }
- .regex-versions {
- display: grid;
- grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
- gap: 1rem;
- margin: 1rem 0;
- }
- .version {
- background-color: #f8f9fa;
- padding: 0.8rem;
- border-radius: 4px;
- }
- .version h3 {
- font-size: 0.9rem;
- margin-bottom: 0.5rem;
- color: #2c3e50;
- }
- pre {
- background-color: #fff;
- padding: 0.5rem;
- border-radius: 4px;
- border: 1px solid #e9ecef;
- font-size: 0.85rem;
- overflow-x: auto;
- }
- .copy-btn {
- margin-top: 0.5rem;
- padding: 0.3rem 0.8rem;
- background-color: #3498db;
- color: #fff;
- border: none;
- border-radius: 4px;
- cursor: pointer;
- font-size: 0.85rem;
- transition: background-color 0.2s;
- }
- .copy-btn:hover {
- background-color: #2980b9;
- }
- .regex-description {
- margin-top: 1rem;
- padding-top: 1rem;
- border-top: 1px solid #e9ecef;
- }
- .regex-description h3 {
- font-size: 0.9rem;
- margin-bottom: 0.5rem;
- color: #2c3e50;
- }
- .regex-description p {
- font-size: 0.9rem;
- color: #666;
- line-height: 1.5;
- }
- /* 响应式调整 */
- @media (max-width: 1024px) {
- .regex-categories {
- column-count: 2;
- }
- }
- @media (max-width: 768px) {
- .regex-categories {
- column-count: 1;
- }
- .regex-list {
- grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
- }
- .regex-versions {
- grid-template-columns: 1fr;
- }
- .modal-content {
- width: 95%;
- margin: 1rem auto;
- }
- .subtitle {
- display: none;
- }
- .container {
- padding: 0 0.3rem;
- }
- /* 移动端工具提示调整 */
- .regex-item::after {
- display: none;
- }
-
- .regex-item::before {
- display: none;
- }
- }
- .search-container {
- width: 100%;
- padding: 10px 0;
- display: flex;
- justify-content: center;
- margin-bottom: 10px;
- }
- .search-box {
- position: relative;
- width: 60%;
- max-width: 600px;
- }
- .search-box input {
- width: 100%;
- padding: 15px 45px 15px 20px;
- border: 2px solid #3498db;
- border-radius: 25px;
- font-size: 16px;
- transition: all 0.3s ease;
- outline: none;
- background-color: rgba(255, 255, 255, 0.9);
- box-shadow: 0 4px 6px rgba(52, 152, 219, 0.1);
- }
- .search-box input:focus {
- border-color: #2980b9;
- box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
- background-color: #ffffff;
- transform: translateY(-1px);
- }
- .search-box input::placeholder {
- color: #95a5a6;
- }
- .search-box .search-icon {
- position: absolute;
- right: 20px;
- top: 50%;
- transform: translateY(-50%);
- color: #3498db;
- font-size: 20px;
- pointer-events: none;
- transition: all 0.3s ease;
- }
- .search-box input:focus + .search-icon {
- color: #2980b9;
- }
- /* 搜索结果高亮样式 */
- .regex-item.highlight {
- background-color: #fff3cd;
- border-color: #3498db;
- box-shadow: 0 2px 4px rgba(52, 152, 219, 0.15);
- transform: translateY(-1px);
- }
- .regex-item.hidden {
- display: none;
- }
- /* 响应式调整 */
- @media (max-width: 768px) {
- .search-box {
- width: 90%;
- }
-
- .search-container {
- padding: 15px 0;
- }
- }
- /* 工具市场按钮样式(保持不变) */
- .panel-title>a.x-other-tools {
- margin: 1px 0 0;
- font-size: 13px;
- cursor: pointer;
- text-decoration: none;
- -webkit-user-select: none;
- user-select: none;
- color: #333;
- float: right;
- background-color: #f5f8ff;
- padding: 5px 10px;
- border-radius: 15px;
- border: 1px solid #d0d9ff;
- transition: all 0.3s ease;
- display: flex;
- align-items: center;
- position: absolute;
- right: 15px;
- top: 8px;
- }
- .panel-title>a.x-other-tools .icon-plus-circle {
- display: inline-block;
- width: 16px;
- height: 16px;
- background: url(../static/img/plus-circle.svg) no-repeat center center;
- background-size: contain;
- margin-right: 5px;
- }
- .panel-title>a.x-other-tools .tool-market-badge {
- display: inline-block;
- background-color: #4d89fe;
- color: white;
- padding: 2px 6px;
- border-radius: 10px;
- margin-left: 5px;
- font-size: 12px;
- font-weight: bold;
- }
- .panel-title>a.x-other-tools:hover {
- color: #333;
- background-color: #e6edff;
- box-shadow: 0 2px 5px rgba(0,0,0,0.15);
- transform: translateY(-1px);
- }
- /* 保持原有的顶部导航样式 */
- .x-donate-link {
- float: right;
- line-height: 18px;
- color: #2563eb;
- cursor: pointer;
- text-decoration: none;
- border: none;
- white-space: nowrap;
- margin-right: auto;
- border-radius: 20px;
- background-color: #eff6ff;
- transition: all 0.2s ease;
- position: relative;
- display: inline-flex;
- align-items: center;
- box-shadow: 0 1px 2px rgba(37, 99, 235, 0.1);
- position: absolute;
- right: 230px;
- top: 12px;
- padding: 4px 12px;
- margin: 0 10px;
- font-size: 12px;
- font-weight: normal;
- }
- .x-donate-link:hover {
- background-color: #dbeafe;
- color: #1d4ed8;
- text-decoration: none;
- box-shadow: 0 2px 4px rgba(37, 99, 235, 0.15);
- transform: translateY(-1px);
- }
- .x-donate-link>a {
- font-size: 12px;
- color: blue;
- cursor: pointer;
- text-decoration: underline;
- }
- .x-donate-link>a:hover {
- text-decoration: underline;
- color: #f00;
- }
|