/* 截图点击放大(medium-zoom)—— 全站生效,范围由 .vitepress/theme/index.ts 的 ZOOM_SELECTOR 定义 */ /* 叠加层必须盖住导航和侧边栏:默认主题 --vp-z-index-nav 为 30、 --vp-z-index-sidebar 为 60,所以取 100。 */ .medium-zoom-overlay { z-index: 100; } .medium-zoom-image--opened { z-index: 101; } /* JS 尚未挂载 medium-zoom 时也提前给出「可点击」的鼠标提示 */ .vp-doc img:not(a img):not(.no-zoom) { cursor: zoom-in; } /* 单张图片保持原始尺寸,并在正文区域水平居中。 */ .vp-doc img { display: block; margin: 24px auto; } /* 单行只有一张图片时缩放到内容区域的 40%。 */ .vp-doc p > img:only-child, .vp-doc li > img:only-child { width: 40%; max-width: 40%; height: auto; } /* Web 端手册截图恢复为内容区域全宽展示。 */ .vp-doc img[src*="/images/manual/"]:not([src*="mini-program"]) { width: 100%; max-width: 100%; height: auto; } /* 同一行包含两张图片时,整行缩放到内容区域的 40%。 */ .vp-doc p:has(> img:nth-child(2):last-child) { display: flex; width: 80%; max-width: 80%; height: auto; line-height: 0; margin: 32px auto; align-items: center; justify-content: center; gap: 8px; } .vp-doc p:has(> img:nth-child(2):last-child) > img { width: calc(50% - 4px); max-width: calc(50% - 4px); height: auto; margin: 0; } /* Markdown 内嵌的双图网格统一缩放到内容区域的 80%。 */ .vp-doc div[style*="repeat(2"] { width: 80% !important; max-width: 80% !important; margin: 32px auto !important; } .vp-doc div[style*="repeat(2"] img { width: 100% !important; max-width: 100% !important; height: auto; margin: 0 !important; } .vp-doc div[style*="repeat(3"] img { margin: 0 !important; } .vp-doc div[style*="repeat(2"] figcaption, .vp-doc div[style*="repeat(3"] figcaption { margin-top: 6px; color: var(--vp-c-brand-1); font-size: 16px; font-weight: 600; line-height: 1.4; } /* 手册图片组共用图片行和图注行,图片高度不同时图注仍保持并排对齐。 */ .vp-doc .manual-image-grid { align-items: stretch !important; row-gap: 6px !important; } .vp-doc .manual-image-grid > figure { display: grid; grid-row: span 2; grid-template-rows: subgrid; min-width: 0; } .vp-doc .manual-image-grid > figure > img { align-self: start; width: 100% !important; max-width: 100% !important; margin: 0 !important; } .vp-doc .manual-image-grid > figure > figcaption { align-self: start; margin: 0; text-align: center; color: var(--vp-c-brand-1); font-size: 16px; font-weight: 600; line-height: 1.4; } /* 接口文档和 Web 端手册的表格铺满正文区域。 */ .vp-doc[class*="_docs_openapi_"] table, .vp-doc[class*="_docs_manual_web_"] table { display: table; width: 100%; max-width: 100%; table-layout: auto; } .openapi-page .custom-block.warning, .openapi-page .custom-block.danger { background-color: var(--vp-code-block-bg); } .openapi-page .custom-block.warning code, .openapi-page .custom-block.danger code { background-color: var(--vp-code-bg); } @media (max-width: 767px) { .vp-doc[class*="_docs_openapi_"] table, .vp-doc[class*="_docs_manual_web_"] table { display: block; overflow-x: auto; } } .manual-entry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 28px 0 36px; } .manual-entry-card { display: flex; min-height: 190px; padding: 24px; flex-direction: column; border: 1px solid var(--vp-c-divider); border-radius: 10px; background: var(--vp-c-bg-soft); color: inherit; text-decoration: none; transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s; } .manual-entry-card:hover { border-color: var(--vp-c-brand-1); box-shadow: 0 8px 24px rgb(60 90 180 / 12%); transform: translateY(-2px); } .manual-entry-title { color: var(--vp-c-brand-1); font-size: 22px; font-weight: 700; } .manual-entry-desc { margin-top: 12px; color: var(--vp-c-text-2); font-size: 14px; line-height: 1.7; } .manual-entry-link { margin-top: auto; padding-top: 18px; color: var(--vp-c-brand-1); font-size: 14px; font-weight: 600; } .mini-program-entry { display: flex; width: min(100%, 520px); margin: 28px auto 12px; flex-direction: column; align-items: center; text-align: center; } .vp-doc .mini-program-entry + h2 { margin-top: 12px; } .mini-program-entry__qr { margin: 0; } .mini-program-entry__qr img { width: 196px; max-width: 58vw; margin: 0 auto; } .mini-program-entry__qr figcaption { margin-top: 12px; color: var(--vp-c-brand-1); font-size: 15px; font-weight: 600; } .mini-program-entry__hint { margin: 14px 0 0; color: var(--vp-c-text-2); font-size: 14px; line-height: 1.7; } @media (max-width: 640px) { .manual-entry-grid { grid-template-columns: 1fr; } }