示例工程 14-figure-picture

14-figure-picture/demo-02-picture/assets/narrow.svg

xml · 0.6 KB

运行:picture 演示

点击「运行示例」后,左侧显示源码、右侧显示运行结果;console 输出会实时回传。

<svg xmlns="http://www.w3.org/2000/svg" width="400" height="600" viewBox="0 0 400 600">
  <rect width="400" height="600" fill="#f0fdf4"/>
  <rect x="40" y="40" width="320" height="220" rx="14" fill="#bbf7d0" stroke="#16a34a" stroke-width="4"/>
  <rect x="40" y="300" width="320" height="220" rx="14" fill="#dcfce7" stroke="#16a34a" stroke-width="4"/>
  <text x="200" y="165" font-family="system-ui, sans-serif" font-size="26" fill="#14532d" text-anchor="middle">窄屏布局</text>
  <text x="200" y="425" font-family="system-ui, sans-serif" font-size="26" fill="#14532d" text-anchor="middle">纵向排列</text>
</svg>