Possible to build an svg that has fluid horizontal scaling, similar to old table-slice method?

前端 未结 4 1449
野的像风
野的像风 2020-12-30 06:23

I am attempting to build an svg that can be scaled horizontally and fluidly, similar to the old table-sliced images used to scale a header fluidly across the top of a page.

4条回答
  •  死守一世寂寞
    2020-12-30 06:45

    If you can place each svg in a DIV, its size will determine its svg. However, svg sizing must be in percentages. This may not serve you, for complex svg, with everything is 'floating'

    The simple rectangle example is shown below:

    
    
    
    
    
    
    
    DIV width=400px height=100px:

    No DIV

    DIV width=300px height=50px:

提交回复
热议问题