Scale inline SVG symbol referenced with

前端 未结 1 1897
逝去的感伤
逝去的感伤 2021-01-04 08:34

I have an SVG logo defined as a symbol like so:


    
           


        
1条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-04 08:45

    Unfortunately it is the dimensions of the element that appears in your

    that is important. There is no way to inherit a viewBox from a child symbol reference.

    You would need to copy the viewBox (width and height) from the symbol.

    .Header-logo {
        height: 5rem;
    }
    
    .Header-logo2 {
        height: 8rem;
    }
    
        
    
    
    
    

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