2026-01-15 20:10:19 +08:00
|
|
|
|
<template>
|
2026-01-16 19:10:21 +08:00
|
|
|
|
<div class="flex-demo">
|
2026-02-14 12:14:07 +08:00
|
|
|
|
<div class="demo-header">
|
2026-02-14 22:48:56 +08:00
|
|
|
|
<span class="title">Flexbox 布局</span>
|
|
|
|
|
|
<span class="subtitle">通过调整参数观察元素排列方式的变化</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="axis-concept">
|
|
|
|
|
|
<div class="concept-row">
|
|
|
|
|
|
<div class="concept-item">
|
|
|
|
|
|
<div class="concept-visual main">
|
|
|
|
|
|
<span class="arrow">→</span>
|
|
|
|
|
|
<span class="label">主轴</span>
|
|
|
|
|
|
<span class="arrow">→</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="concept-desc">
|
|
|
|
|
|
<strong>主轴 (Main Axis)</strong>
|
|
|
|
|
|
<span>元素排列的方向,由 flex-direction 决定</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="concept-item">
|
|
|
|
|
|
<div class="concept-visual cross">
|
|
|
|
|
|
<span class="arrow">↓</span>
|
|
|
|
|
|
<span class="label">交叉轴</span>
|
|
|
|
|
|
<span class="arrow">↓</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="concept-desc">
|
|
|
|
|
|
<strong>交叉轴 (Cross Axis)</strong>
|
|
|
|
|
|
<span>垂直于主轴,用于对齐元素</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2026-02-14 12:14:07 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
2026-02-14 20:23:34 +08:00
|
|
|
|
<div class="main-area">
|
2026-02-14 12:14:07 +08:00
|
|
|
|
<div class="controls">
|
2026-02-14 20:23:34 +08:00
|
|
|
|
<div class="control-group">
|
2026-02-14 22:48:56 +08:00
|
|
|
|
<label>flex-direction</label>
|
2026-02-14 12:14:07 +08:00
|
|
|
|
<div class="chips">
|
|
|
|
|
|
<button
|
|
|
|
|
|
v-for="d in directions"
|
|
|
|
|
|
:key="d.id"
|
|
|
|
|
|
:class="['chip', { active: dir === d.id }]"
|
|
|
|
|
|
@click="dir = d.id"
|
|
|
|
|
|
>
|
|
|
|
|
|
{{ d.label }}
|
|
|
|
|
|
</button>
|
|
|
|
|
|
</div>
|
2026-01-15 20:10:19 +08:00
|
|
|
|
</div>
|
2026-02-14 20:23:34 +08:00
|
|
|
|
<div class="control-group">
|
2026-02-14 22:48:56 +08:00
|
|
|
|
<label>justify-content(主轴对齐)</label>
|
2026-02-14 12:14:07 +08:00
|
|
|
|
<div class="chips">
|
|
|
|
|
|
<button
|
|
|
|
|
|
v-for="j in justifies"
|
|
|
|
|
|
:key="j.id"
|
|
|
|
|
|
:class="['chip', { active: justify === j.id }]"
|
|
|
|
|
|
@click="justify = j.id"
|
|
|
|
|
|
>
|
|
|
|
|
|
{{ j.label }}
|
|
|
|
|
|
</button>
|
|
|
|
|
|
</div>
|
2026-01-15 20:10:19 +08:00
|
|
|
|
</div>
|
2026-02-14 20:23:34 +08:00
|
|
|
|
<div class="control-group">
|
2026-02-14 22:48:56 +08:00
|
|
|
|
<label>align-items(交叉轴对齐)</label>
|
|
|
|
|
|
<div class="chips">
|
|
|
|
|
|
<button
|
|
|
|
|
|
v-for="a in aligns"
|
|
|
|
|
|
:key="a.id"
|
|
|
|
|
|
:class="['chip', { active: align === a.id }]"
|
|
|
|
|
|
@click="align = a.id"
|
|
|
|
|
|
>
|
|
|
|
|
|
{{ a.label }}
|
|
|
|
|
|
</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="control-group">
|
|
|
|
|
|
<label>flex-wrap</label>
|
2026-02-14 12:14:07 +08:00
|
|
|
|
<div class="chips">
|
|
|
|
|
|
<button
|
|
|
|
|
|
v-for="w in wraps"
|
|
|
|
|
|
:key="w.id"
|
|
|
|
|
|
:class="['chip', { active: wrap === w.id }]"
|
|
|
|
|
|
@click="wrap = w.id"
|
|
|
|
|
|
>
|
|
|
|
|
|
{{ w.label }}
|
|
|
|
|
|
</button>
|
|
|
|
|
|
</div>
|
2026-01-15 20:10:19 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2026-02-14 12:14:07 +08:00
|
|
|
|
|
2026-02-14 20:23:34 +08:00
|
|
|
|
<div class="preview-area">
|
2026-02-14 12:14:07 +08:00
|
|
|
|
<div class="canvas" :style="boxStyle">
|
2026-02-14 22:48:56 +08:00
|
|
|
|
<div v-for="n in 6" :key="n" class="item">{{ n }}</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="axis-hint">
|
|
|
|
|
|
<span class="axis-tag main">主轴方向: {{ dir === 'row' ? '水平 →' : '垂直 ↓' }}</span>
|
|
|
|
|
|
<span class="axis-tag cross">交叉轴方向: {{ dir === 'row' ? '垂直 ↓' : '水平 →' }}</span>
|
2026-01-15 20:10:19 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2026-02-14 20:23:34 +08:00
|
|
|
|
</div>
|
2026-01-15 20:10:19 +08:00
|
|
|
|
|
2026-02-14 20:23:34 +08:00
|
|
|
|
<div class="code-row">
|
2026-02-14 22:48:56 +08:00
|
|
|
|
<div class="code-label">CSS</div>
|
|
|
|
|
|
<code class="code-text">{{ cssCode }}</code>
|
2026-01-16 19:10:21 +08:00
|
|
|
|
</div>
|
2026-01-15 20:10:19 +08:00
|
|
|
|
|
2026-02-14 12:14:07 +08:00
|
|
|
|
<div class="info-box">
|
2026-02-14 22:48:56 +08:00
|
|
|
|
<strong>记忆方法:</strong>
|
|
|
|
|
|
<code>justify-content</code> 控制主轴方向的对齐(水平时左右,垂直时上下);
|
|
|
|
|
|
<code>align-items</code> 控制交叉轴方向的对齐。
|
2026-01-15 20:10:19 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
|
|
import { computed, ref } from 'vue'
|
|
|
|
|
|
|
2026-01-16 19:10:21 +08:00
|
|
|
|
const directions = [
|
2026-02-14 22:48:56 +08:00
|
|
|
|
{ id: 'row', label: 'row(水平)' },
|
|
|
|
|
|
{ id: 'column', label: 'column(垂直)' }
|
2026-01-16 19:10:21 +08:00
|
|
|
|
]
|
|
|
|
|
|
const justifies = [
|
2026-02-14 22:48:56 +08:00
|
|
|
|
{ id: 'flex-start', label: 'flex-start' },
|
|
|
|
|
|
{ id: 'center', label: 'center' },
|
|
|
|
|
|
{ id: 'flex-end', label: 'flex-end' },
|
|
|
|
|
|
{ id: 'space-between', label: 'space-between' },
|
|
|
|
|
|
{ id: 'space-around', label: 'space-around' }
|
|
|
|
|
|
]
|
|
|
|
|
|
const aligns = [
|
|
|
|
|
|
{ id: 'stretch', label: 'stretch' },
|
|
|
|
|
|
{ id: 'flex-start', label: 'flex-start' },
|
|
|
|
|
|
{ id: 'center', label: 'center' },
|
|
|
|
|
|
{ id: 'flex-end', label: 'flex-end' }
|
2026-01-16 19:10:21 +08:00
|
|
|
|
]
|
|
|
|
|
|
const wraps = [
|
2026-02-14 22:48:56 +08:00
|
|
|
|
{ id: 'nowrap', label: 'nowrap' },
|
|
|
|
|
|
{ id: 'wrap', label: 'wrap' }
|
2026-01-16 19:10:21 +08:00
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
const dir = ref('row')
|
|
|
|
|
|
const justify = ref('flex-start')
|
2026-02-14 22:48:56 +08:00
|
|
|
|
const align = ref('stretch')
|
2026-01-16 19:10:21 +08:00
|
|
|
|
const wrap = ref('nowrap')
|
|
|
|
|
|
|
|
|
|
|
|
const boxStyle = computed(() => ({
|
2026-01-15 20:10:19 +08:00
|
|
|
|
display: 'flex',
|
2026-01-16 19:10:21 +08:00
|
|
|
|
flexDirection: dir.value,
|
|
|
|
|
|
justifyContent: justify.value,
|
2026-02-14 22:48:56 +08:00
|
|
|
|
alignItems: align.value,
|
2026-01-16 19:10:21 +08:00
|
|
|
|
flexWrap: wrap.value,
|
2026-02-14 20:23:34 +08:00
|
|
|
|
gap: '8px',
|
2026-02-14 22:48:56 +08:00
|
|
|
|
minHeight: dir.value === 'column' ? '240px' : '100px'
|
2026-01-15 20:10:19 +08:00
|
|
|
|
}))
|
2026-02-14 22:48:56 +08:00
|
|
|
|
|
|
|
|
|
|
const cssCode = computed(() => {
|
|
|
|
|
|
const parts = ['display: flex']
|
|
|
|
|
|
if (dir.value !== 'row') parts.push(`flex-direction: ${dir.value}`)
|
|
|
|
|
|
if (justify.value !== 'flex-start') parts.push(`justify-content: ${justify.value}`)
|
|
|
|
|
|
if (align.value !== 'stretch') parts.push(`align-items: ${align.value}`)
|
|
|
|
|
|
if (wrap.value !== 'nowrap') parts.push(`flex-wrap: ${wrap.value}`)
|
|
|
|
|
|
return parts.join('; ') + ';'
|
|
|
|
|
|
})
|
2026-01-15 20:10:19 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
2026-01-16 19:10:21 +08:00
|
|
|
|
.flex-demo {
|
2026-01-15 20:10:19 +08:00
|
|
|
|
border: 1px solid var(--vp-c-divider);
|
2026-02-14 22:48:56 +08:00
|
|
|
|
border-radius: 8px;
|
2026-01-15 20:10:19 +08:00
|
|
|
|
background: var(--vp-c-bg-soft);
|
2026-02-14 22:48:56 +08:00
|
|
|
|
padding: 1rem;
|
|
|
|
|
|
margin: 1rem 0;
|
2026-02-14 12:14:07 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.demo-header {
|
2026-02-14 22:48:56 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
gap: 0.25rem;
|
|
|
|
|
|
margin-bottom: 1rem;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.demo-header .title {
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
font-size: 1rem;
|
|
|
|
|
|
color: var(--vp-c-text-1);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.demo-header .subtitle {
|
|
|
|
|
|
color: var(--vp-c-text-2);
|
|
|
|
|
|
font-size: 0.85rem;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.axis-concept {
|
|
|
|
|
|
background: var(--vp-c-bg);
|
|
|
|
|
|
border: 1px solid var(--vp-c-divider);
|
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
|
padding: 0.75rem;
|
|
|
|
|
|
margin-bottom: 1rem;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.concept-row {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
gap: 1.5rem;
|
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.concept-item {
|
2026-01-15 20:10:19 +08:00
|
|
|
|
display: flex;
|
2026-02-14 12:14:07 +08:00
|
|
|
|
align-items: center;
|
2026-02-14 22:48:56 +08:00
|
|
|
|
gap: 0.75rem;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.concept-visual {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
gap: 0.25rem;
|
|
|
|
|
|
padding: 0.4rem 0.6rem;
|
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
|
font-size: 0.75rem;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.concept-visual.main {
|
|
|
|
|
|
background: rgba(14, 165, 233, 0.15);
|
|
|
|
|
|
color: var(--vp-c-brand);
|
2026-02-14 12:14:07 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-14 22:48:56 +08:00
|
|
|
|
.concept-visual.cross {
|
|
|
|
|
|
background: rgba(34, 197, 94, 0.15);
|
|
|
|
|
|
color: #16a34a;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.concept-visual .arrow {
|
|
|
|
|
|
font-size: 0.7rem;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.concept-visual .label {
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.concept-desc {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
gap: 0.1rem;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.concept-desc strong {
|
|
|
|
|
|
font-size: 0.8rem;
|
|
|
|
|
|
color: var(--vp-c-text-1);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.concept-desc span {
|
|
|
|
|
|
font-size: 0.75rem;
|
|
|
|
|
|
color: var(--vp-c-text-2);
|
|
|
|
|
|
}
|
2026-02-14 12:14:07 +08:00
|
|
|
|
|
2026-02-14 20:23:34 +08:00
|
|
|
|
.main-area {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
grid-template-columns: auto 1fr;
|
|
|
|
|
|
gap: 1rem;
|
2026-02-14 22:48:56 +08:00
|
|
|
|
margin-bottom: 1rem;
|
2026-02-14 12:14:07 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-14 22:48:56 +08:00
|
|
|
|
@media (max-width: 768px) {
|
2026-02-14 20:23:34 +08:00
|
|
|
|
.main-area { grid-template-columns: 1fr; }
|
2026-01-15 20:10:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.controls {
|
2026-02-14 20:23:34 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
2026-02-14 22:48:56 +08:00
|
|
|
|
gap: 0.75rem;
|
|
|
|
|
|
min-width: 200px;
|
2026-01-15 20:10:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-14 20:23:34 +08:00
|
|
|
|
.control-group {
|
2026-01-16 19:10:21 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
2026-02-14 22:48:56 +08:00
|
|
|
|
gap: 0.35rem;
|
2026-01-15 20:10:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-14 20:23:34 +08:00
|
|
|
|
.control-group label {
|
|
|
|
|
|
font-size: 0.75rem;
|
2026-02-14 12:14:07 +08:00
|
|
|
|
font-weight: 600;
|
2026-02-14 20:23:34 +08:00
|
|
|
|
color: var(--vp-c-text-2);
|
2026-02-14 22:48:56 +08:00
|
|
|
|
font-family: var(--vp-font-family-mono);
|
2026-01-15 20:10:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-01-16 19:10:21 +08:00
|
|
|
|
.chips {
|
2026-01-15 20:10:19 +08:00
|
|
|
|
display: flex;
|
2026-02-14 22:48:56 +08:00
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
gap: 0.35rem;
|
2026-01-15 20:10:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-01-16 19:10:21 +08:00
|
|
|
|
.chip {
|
2026-02-14 22:48:56 +08:00
|
|
|
|
padding: 0.3rem 0.5rem;
|
2026-02-14 20:23:34 +08:00
|
|
|
|
border-radius: 4px;
|
2026-01-16 19:10:21 +08:00
|
|
|
|
border: 1px solid var(--vp-c-divider);
|
2026-02-14 20:23:34 +08:00
|
|
|
|
background: var(--vp-c-bg);
|
2026-01-15 20:10:19 +08:00
|
|
|
|
cursor: pointer;
|
2026-02-14 22:48:56 +08:00
|
|
|
|
font-size: 0.7rem;
|
|
|
|
|
|
font-family: var(--vp-font-family-mono);
|
2026-01-15 20:10:19 +08:00
|
|
|
|
transition: all 0.2s;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-14 20:23:34 +08:00
|
|
|
|
.chip:hover { background: var(--vp-c-bg-soft); }
|
2026-01-16 19:10:21 +08:00
|
|
|
|
.chip.active {
|
2026-01-15 20:10:19 +08:00
|
|
|
|
border-color: var(--vp-c-brand);
|
2026-01-16 19:10:21 +08:00
|
|
|
|
color: var(--vp-c-brand);
|
2026-02-14 12:14:07 +08:00
|
|
|
|
background: var(--vp-c-brand-soft);
|
2026-01-15 20:10:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-14 20:23:34 +08:00
|
|
|
|
.preview-area {
|
2026-01-16 19:10:21 +08:00
|
|
|
|
background: var(--vp-c-bg);
|
|
|
|
|
|
border: 1px solid var(--vp-c-divider);
|
2026-02-14 22:48:56 +08:00
|
|
|
|
border-radius: 8px;
|
2026-02-14 20:23:34 +08:00
|
|
|
|
overflow: hidden;
|
2026-01-15 20:10:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-01-16 19:10:21 +08:00
|
|
|
|
.canvas {
|
|
|
|
|
|
background-image: radial-gradient(var(--vp-c-divider) 1px, transparent 1px);
|
2026-02-14 20:23:34 +08:00
|
|
|
|
background-size: 16px 16px;
|
2026-02-14 22:48:56 +08:00
|
|
|
|
border-radius: 8px;
|
2026-02-14 20:23:34 +08:00
|
|
|
|
transition: all 0.3s;
|
2026-02-14 22:48:56 +08:00
|
|
|
|
padding: 12px;
|
2026-01-15 20:10:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-01-16 19:10:21 +08:00
|
|
|
|
.item {
|
2026-02-14 20:23:34 +08:00
|
|
|
|
width: 40px;
|
|
|
|
|
|
height: 40px;
|
2026-02-14 12:14:07 +08:00
|
|
|
|
border-radius: 6px;
|
|
|
|
|
|
background: var(--vp-c-brand);
|
2026-01-16 19:10:21 +08:00
|
|
|
|
color: #fff;
|
2026-02-14 12:14:07 +08:00
|
|
|
|
font-weight: 700;
|
2026-01-16 19:10:21 +08:00
|
|
|
|
display: grid;
|
|
|
|
|
|
place-items: center;
|
2026-02-14 20:23:34 +08:00
|
|
|
|
font-size: 14px;
|
2026-01-16 19:10:21 +08:00
|
|
|
|
flex-shrink: 0;
|
2026-02-14 22:48:56 +08:00
|
|
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.axis-hint {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
gap: 0.75rem;
|
|
|
|
|
|
padding: 0.5rem 0.75rem;
|
|
|
|
|
|
background: var(--vp-c-bg-soft);
|
|
|
|
|
|
border-top: 1px solid var(--vp-c-divider);
|
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.axis-tag {
|
|
|
|
|
|
font-size: 0.7rem;
|
|
|
|
|
|
padding: 0.2rem 0.5rem;
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
font-family: var(--vp-font-family-mono);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.axis-tag.main {
|
|
|
|
|
|
background: rgba(14, 165, 233, 0.15);
|
|
|
|
|
|
color: var(--vp-c-brand);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.axis-tag.cross {
|
|
|
|
|
|
background: rgba(34, 197, 94, 0.15);
|
|
|
|
|
|
color: #16a34a;
|
2026-01-15 20:10:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-14 20:23:34 +08:00
|
|
|
|
.code-row {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
2026-02-14 22:48:56 +08:00
|
|
|
|
gap: 0.75rem;
|
2026-02-14 20:23:34 +08:00
|
|
|
|
background: var(--vp-c-bg);
|
2026-01-16 19:10:21 +08:00
|
|
|
|
border: 1px solid var(--vp-c-divider);
|
2026-02-14 22:48:56 +08:00
|
|
|
|
border-radius: 8px;
|
|
|
|
|
|
padding: 0.6rem 0.75rem;
|
|
|
|
|
|
margin-bottom: 1rem;
|
2026-02-14 20:23:34 +08:00
|
|
|
|
flex-wrap: wrap;
|
2026-01-15 20:10:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-14 20:23:34 +08:00
|
|
|
|
.code-label {
|
2026-02-14 12:14:07 +08:00
|
|
|
|
font-size: 0.8rem;
|
2026-02-14 20:23:34 +08:00
|
|
|
|
font-weight: 600;
|
2026-01-16 19:10:21 +08:00
|
|
|
|
color: var(--vp-c-text-2);
|
2026-02-14 22:48:56 +08:00
|
|
|
|
font-family: var(--vp-font-family-mono);
|
2026-01-15 20:10:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-14 20:23:34 +08:00
|
|
|
|
.code-text {
|
2026-01-16 19:10:21 +08:00
|
|
|
|
font-family: var(--vp-font-family-mono);
|
2026-02-14 22:48:56 +08:00
|
|
|
|
font-size: 0.8rem;
|
2026-02-14 20:23:34 +08:00
|
|
|
|
color: var(--vp-c-text-1);
|
2026-02-14 22:48:56 +08:00
|
|
|
|
background: var(--vp-c-bg-soft);
|
|
|
|
|
|
padding: 0.3rem 0.5rem;
|
2026-02-14 20:23:34 +08:00
|
|
|
|
border-radius: 4px;
|
2026-02-14 22:48:56 +08:00
|
|
|
|
word-break: break-all;
|
2026-01-15 20:10:19 +08:00
|
|
|
|
}
|
2026-02-14 12:14:07 +08:00
|
|
|
|
|
|
|
|
|
|
.info-box {
|
|
|
|
|
|
background: var(--vp-c-bg-alt);
|
2026-02-14 22:48:56 +08:00
|
|
|
|
padding: 0.75rem 1rem;
|
|
|
|
|
|
border-radius: 8px;
|
2026-02-14 12:14:07 +08:00
|
|
|
|
font-size: 0.85rem;
|
|
|
|
|
|
color: var(--vp-c-text-2);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-14 20:23:34 +08:00
|
|
|
|
.info-box strong { color: var(--vp-c-text-1); }
|
2026-02-14 22:48:56 +08:00
|
|
|
|
.info-box code {
|
|
|
|
|
|
background: var(--vp-c-bg-soft);
|
|
|
|
|
|
padding: 0.1rem 0.3rem;
|
|
|
|
|
|
border-radius: 3px;
|
|
|
|
|
|
font-size: 0.8rem;
|
|
|
|
|
|
}
|
2026-01-15 20:10:19 +08:00
|
|
|
|
</style>
|