【发布时间】:2022-11-10 23:08:25
【问题描述】:
如何将 png 图像导入 nextJS svg 组件。
这是我正在使用的示例代码。
<Page title="Logo Designer" className="max-w-xl">
<div>
<svg id="logoDesigner" width={700} height={600} style={{ backgroundColor: 'lightgray' }}>
<rect class="draggable" x="4" y="5" width="80" height="100" fill="#007bff" />
<rect class="draggable" x="18" y="5" width="80" height="400" fill="#888" />
</svg>
</div>
</Page>
【问题讨论】: