How to get ScrollBars in SVG?

前端 未结 2 497
一生所求
一生所求 2020-11-27 20:53

I have a SVG-element with a lot of elements inside. The SVG-element has a viewbox, so you can press a zoom-button and the elements appear bigger or smaller. Works well. Now

2条回答
  •  星月不相逢
    2020-11-27 21:14

    Part of the point of SVG is so that it can scale to fit the screen. However, I think if you want to get something like what you are describing, then you need to set explicit width and height to the svg element. Something like http://jsfiddle.net/qTFxJ/13/ where I set the width and height in pixels to match your viewBox size.

提交回复
热议问题