SVG: stretching an image

前端 未结 2 1156
渐次进展
渐次进展 2020-12-30 20:07

I\'m playing around with the SVG tutorial and I simply loaded an image like this:




        
相关标签:
2条回答
  • 2020-12-30 20:10

    It is also possible scale and change the aspect ratio of an SVG by using pure CSS:

    transform: scale(x, y);

    0 讨论(0)
  • 2020-12-30 20:29

    Set preserveAspectRatio="none" on the SVG element:

    <svg viewBox="0 0 500 500" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg" >
    
    0 讨论(0)
提交回复
热议问题