示例工程 13-images
13-images/demo-01-alt/assets/hero.svg
点击「运行示例」后,左侧显示源码、右侧显示运行结果;console 输出会实时回传。
<svg xmlns="http://www.w3.org/2000/svg" width="800" height="450" viewBox="0 0 800 450" role="img" aria-label="图片加载流程示意图">
<rect width="800" height="450" fill="#eff6ff"/>
<rect x="60" y="70" width="200" height="310" rx="16" fill="#bfdbfe" stroke="#2563eb" stroke-width="4"/>
<text x="160" y="230" font-family="system-ui, sans-serif" font-size="28" fill="#1e3a8a" text-anchor="middle">请求</text>
<path d="M280 225 H360" stroke="#2563eb" stroke-width="6" stroke-linecap="round"/>
<path d="M350 210 L370 225 L350 240" fill="none" stroke="#2563eb" stroke-width="6" stroke-linecap="round"/>
<rect x="390" y="70" width="200" height="310" rx="16" fill="#dbeafe" stroke="#2563eb" stroke-width="4"/>
<text x="490" y="230" font-family="system-ui, sans-serif" font-size="28" fill="#1e3a8a" text-anchor="middle">解码</text>
<path d="M610 225 H690" stroke="#2563eb" stroke-width="6" stroke-linecap="round"/>
<path d="M680 210 L700 225 L680 240" fill="none" stroke="#2563eb" stroke-width="6" stroke-linecap="round"/>
<text x="400" y="410" font-family="system-ui, sans-serif" font-size="22" fill="#475569" text-anchor="middle">width / height 预留空间,避免布局跳动</text>
</svg>