示例工程 17-gallery-page
17-gallery-page/demo-02-picture/assets/coast.svg
点击「运行示例」后,左侧显示源码、右侧显示运行结果;console 输出会实时回传。
<svg xmlns="http://www.w3.org/2000/svg" width="480" height="320" viewBox="0 0 480 320">
<rect width="480" height="320" fill="#cffafe"/>
<circle cx="380" cy="80" r="42" fill="#a5f3fc"/>
<path d="M0 250 L120 130 L210 220 L300 150 L480 260 L480 320 L0 320 Z" fill="#a5f3fc"/>
<path d="M0 280 L150 190 L260 260 L360 210 L480 290 L480 320 L0 320 Z" fill="#0e7490" opacity="0.75"/>
<text x="30" y="52" font-family="system-ui, sans-serif" font-size="22" fill="#0e7490">海岸线</text>
<text x="30" y="78" font-family="system-ui, sans-serif" font-size="14" fill="#0e7490" opacity="0.8">自然 · 示例作品</text>
</svg>