How to translate an SVG group by a percentage of the viewport

前端 未结 1 932
眼角桃花
眼角桃花 2020-12-09 14:54

I have an svg that is in a (group) and I would like to scale it and then translate it by a percentage of the viewport. Most

1条回答
  •  南方客
    南方客 (楼主)
    2020-12-09 15:25

    Stick the element in an inner element and add x and y attributes with percentage values to the inner element to translate it.

    
      
        
          
        
      
    
    

    If you want the scale to apply first you would put the element inside the instead.

    0 讨论(0)
提交回复
热议问题