【发布时间】:2020-05-07 21:24:03
【问题描述】:
我在 Vue 中编写了一个白板。只有一个 svg 元素,我添加了其他 svg 元素,如路径。我想在这个 svg 中滚动并看到这个例子,这非常好。
这是我的 html 部分。
<svg width="1300px" height="500px" style="overflow-x:scroll; overflow-y:scroll;" viewBox="0 0 1300 500" class="flex-item" id="whiteboard" ref="whiteboard"/>
我也有它的风格部分。
#whiteboard {
/*position: absolute;*/
/*width: 100%;
height: 100%;*/
background: rgb(255, 255, 255);
z-index: 1;
}
我不知道为什么它不起作用。也许是因为 Vue 我不知道 :(
感谢您的帮助:D
【问题讨论】: