铺满,箭头在悬停时右移一格作为可点的提示。
*/
.cards.links .card {
display: flex;
flex-direction: column;
gap: 4px;
color: inherit;
transition: border-color .15s, box-shadow .15s;
}
.cards.links .card:hover {
border-color: var(--green);
text-decoration: none;
box-shadow: 0 12px 32px -22px rgba(7, 193, 96, .5);
}
.cards.links .card h3 {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
margin: 0;
}
.cards.links .card h3::after {
content: "→";
flex: none;
color: var(--green);
opacity: .55;
transition: transform .15s, opacity .15s;
}
.cards.links .card:hover h3::after { transform: translateX(3px); opacity: 1; }
.cards.links .card p { margin: 0; }
/* ---------- code ---------- */
pre {
margin: 0 0 20px;
padding: 18px 20px;
overflow-x: auto;
border-radius: var(--radius);
background: var(--code-bg);
color: #E6EDF3;
font-size: 14px;
line-height: 1.7;
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}
code {
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
font-size: 0.92em;
}
p code, li code, td code {
padding: 2px 6px;
border-radius: 5px;
background: var(--soft);
color: var(--green-dark);
}
/* ---------- steps ---------- */
ol.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
ol.steps > li {
position: relative;
counter-increment: step;
padding: 0 0 32px 48px;
border-left: 2px solid var(--line);
margin-left: 16px;
}
ol.steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
ol.steps > li::before {
content: counter(step);
position: absolute;
left: -17px;
top: 0;
width: 32px; height: 32px;
display: grid;
place-items: center;
border-radius: 50%;
background: var(--green);
color: #fff;
font-size: 14px;
font-weight: 600;
}
ol.steps h3 { margin: 0 0 10px; font-size: 17px; font-weight: 600; }
ol.steps p { margin: 0 0 12px; font-size: 15px; color: var(--muted); }
ol.steps pre { margin-bottom: 12px; }
.note {
margin: 0;
padding: 14px 18px;
border-left: 3px solid var(--green);
border-radius: 0 8px 8px 0;
background: var(--soft);
font-size: 14px;
color: var(--ink);
}
.note strong { font-weight: 600; }
/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 0 20px; }
table {
width: 100%;
border-collapse: collapse;
font-size: 15px;
}
th, td {
padding: 12px 14px;
text-align: left;
border-bottom: 1px solid var(--line);
vertical-align: top;
}
th { font-weight: 600; color: var(--muted); font-size: 14px; white-space: nowrap; }
/* ---------- diagram ---------- */
.diagram {
margin: 0 0 24px;
padding: 8px;
border: 1px solid var(--line);
border-radius: var(--radius);
background: var(--soft);
overflow-x: auto;
}
.diagram svg { display: block; margin: 0 auto; max-width: 100%; height: auto; }
/* ---------- limits ---------- */
.limits li { margin-bottom: 10px; color: var(--muted); }
.limits strong { color: var(--ink); font-weight: 600; }
/* ---------- footer ---------- */
footer {
padding: 48px 0 64px;
background: var(--soft);
border-top: 1px solid var(--line);
font-size: 14px;
color: var(--muted);
}
footer .wrap { display: flex; flex-wrap: wrap; gap: 24px 40px; justify-content: space-between; }
footer ul { margin: 0; padding: 0; list-style: none; }
footer li { margin-bottom: 6px; }
@media (max-width: 600px) {
.hero { padding: 52px 20px 44px; }
section { padding: 48px 0; }
.wrap { padding: 0 20px; }
th, td { padding: 10px 8px; }
/* 窄屏时手机长图再收一档,免得截图区比正文还长。 */
.shot img.tall { height: 380px; }
/*
发布历史在窄屏挤在一行时,行与行之间的换行位置不一致:名称长的独占一行,
名称短的却和徽章同行,日期又各自落在不同位置。改成两行网格:
第一行徽章 + 最新标,第二行名称,日期靠右与名称同行。
*/
.releases a {
display: grid;
grid-template-columns: 1fr auto;
align-items: baseline;
gap: 6px 12px;
padding: 14px 18px;
}
.releases .release-tag { grid-column: 1; grid-row: 1; justify-self: start; }
.releases .release-latest { grid-column: 2; grid-row: 1; justify-self: start; }
.releases .release-name { grid-column: 1 / -1; grid-row: 2; }
.releases .release-date { grid-column: 1 / -1; grid-row: 3; }
}
/* ---------- article(文章页 article/*.html 用) ---------- */
.article {
max-width: 760px;
margin: 0 auto;
padding: 56px 24px 80px;
}
.article-header {
margin-bottom: 40px;
padding-bottom: 28px;
border-bottom: 1px solid var(--line);
}
.article-header h1 {
margin: 0 0 12px;
font-size: clamp(26px, 4.2vw, 36px);
line-height: 1.35;
letter-spacing: -0.02em;
}
.article-header .byline {
margin: 0;
font-size: 14px;
color: var(--muted);
}
.article h2 {
margin: 52px 0 14px;
padding-top: 8px;
font-size: 22px;
}
.article h3 {
margin: 32px 0 10px;
font-size: 17px;
font-weight: 600;
}
.article p { margin: 0 0 18px; }
.article ul, .article ol { margin: 0 0 18px; padding-left: 22px; }
.article li { margin-bottom: 10px; }
/* 文章里的引用块用来说明「为什么这样做」,与落地页的 .note 区分开 */
.article blockquote {
margin: 0 0 20px;
padding: 16px 20px;
border-left: 3px solid var(--line);
border-radius: 0 8px 8px 0;
background: var(--soft);
font-size: 15px;
color: var(--muted);
}
.article blockquote p:last-child { margin-bottom: 0; }
.article pre { font-size: 13px; }
/* 目录 */
.toc {
margin: 0 0 44px;
padding: 20px 24px;
border: 1px solid var(--line);
border-radius: var(--radius);
background: var(--soft);
}
.toc p { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.toc ol { margin: 0; padding-left: 20px; font-size: 15px; }
.toc li { margin-bottom: 6px; }
.article-footer {
margin-top: 56px;
padding-top: 28px;
border-top: 1px solid var(--line);
font-size: 14px;
color: var(--muted);
}
/* 文章页的返回链接 */
.back {
display: inline-block;
margin-bottom: 28px;
font-size: 14px;
}
@media (max-width: 600px) {
.article { padding: 40px 20px 60px; }
.article h2 { margin-top: 40px; }
}
/*
文章里的表格:第一列是「标签」,被挤成四行很难读。给一个下限,
超宽时由外层 .table-wrap 横向滚动接住(不换行压缩列宽)。
*/
.article table td:first-child,
.article table th:first-child { min-width: 6.5em; }
/* ---------- 命令块与复制按钮 ---------- */
/*
.cmd 包住一个 和一个复制按钮。按钮绝对定位在右上角,
所以 需要预留右上内边距,否则长命令会钻到按钮下面。
*/
.cmd { position: relative; margin: 0 0 20px; }
.cmd pre { margin-bottom: 0; padding-right: 84px; }
/*
命令块换行而不横向滚动。横向滚动时,超出的文字会滚到右侧 padding 区域
被复制按钮压住(Chrome 不把容器的右 padding 算进滚动区末端)。
这些命令都很短,换行比滚动更合适,也保证按钮永远不遮字。
*/
.cmd pre code { white-space: pre-wrap; overflow-wrap: anywhere; }
.cmd .copy {
position: absolute;
top: 10px;
right: 10px;
padding: 5px 12px;
border: 1px solid rgba(255, 255, 255, .22);
border-radius: 7px;
background: rgba(255, 255, 255, .08);
color: #C9D6E2;
font-size: 12px;
line-height: 1.5;
font-family: inherit;
cursor: pointer;
transition: background .15s, color .15s, border-color .15s;
}
.cmd .copy:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.cmd .copy:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
/* 复制成功后短暂变绿,作为「点到了」的反馈 */
.cmd .copy.copied {
border-color: var(--green);
background: rgba(7, 193, 96, .18);
color: #7BE3AD;
}
/* ---------- 更新日志 ---------- */
.releases { margin: 0; padding: 0; list-style: none; }
.releases > li {
padding: 18px 0;
border-bottom: 1px solid var(--line);
}
.releases > li:last-child { border-bottom: 0; }
.releases .ver {
display: flex;
align-items: baseline;
gap: 10px;
flex-wrap: wrap;
margin-bottom: 6px;
}
.releases .ver a {
font-size: 17px;
font-weight: 600;
color: var(--ink);
}
.releases .ver a:hover { color: var(--green-dark); }
/* 最新版本给一个标记,避免读者以为列表顺序不可靠 */
.releases .tag {
padding: 1px 8px;
border-radius: 999px;
background: rgba(7, 193, 96, .12);
color: var(--green-dark);
font-size: 12px;
font-weight: 500;
}
.releases .date { font-size: 13px; color: var(--muted); }
.releases p { margin: 0; font-size: 15px; color: var(--muted); }
/* ---------- 安装方式二选一 ---------- */
.ways {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 20px;
margin: 0 0 32px;
}
.way {
padding: 22px 24px;
border: 1px solid var(--line);
border-radius: var(--radius);
background: #fff;
}
.way h3 { margin: 0 0 8px; font-size: 16px; font-weight: 600; }
.way > p { margin: 0 0 14px; font-size: 14px; color: var(--muted); }
/* 安装方式里的图,尺寸与截图位一致,但不需要虚线框 */
.way figure { margin: 0; }
.way img {
display: block;
width: 100%;
height: auto;
max-height: 320px;
object-fit: contain;
margin-bottom: 10px;
border-radius: 8px;
background: var(--soft);
}
.way figcaption { font-size: 13px; color: var(--muted); }
/*
缺图时的占位。判据是「figure 里还有没有 img」,与 .shot 一致:
图片加载失败时 onerror 把它移出 DOM,:not(:has(img)) 随之成立,
占位提示就出现。图片加载成功则 onload 清掉 data-placeholder,恢复普通排版。
注意不能靠 data-placeholder 自己去 display:none 掉 img——那样图片永远不会加载,
onload 也就永远不触发,占位和真图会同时消失。
*/
.way figure[data-placeholder]:not(:has(img)) {
display: grid;
place-items: center;
min-height: 200px;
padding: 16px;
border: 1px dashed #B9D8C6;
border-radius: 8px;
background: var(--soft);
text-align: center;
}
.way figure[data-placeholder]:not(:has(img))::before {
content: attr(data-placeholder);
white-space: pre-line;
font-size: 13px;
line-height: 1.9;
color: #6B8A79;
}
.way figure[data-placeholder]:not(:has(img)) figcaption { display: none; }