How can I refer to an internal gradient definition inside an SVG sprite symbol?

后端 未结 2 531
眼角桃花
眼角桃花 2021-01-30 17:48

SUMMARY: An SVG sprite contains five icon blocks, one of which references its own gradient definition by ID. It is no longer able to find t

2条回答
  •  你的背包
    2021-01-30 18:24

    Don't use style="display: none;" in SVG. You have it on the root element. Either visibility:hidden, height/width="0" or are better alternatives.

    There used to be a bug in Firefox with gradient elements in symbols. That bug was fixed many versions ago now. The original code works as expected.

    
    
      
        
        
      
        
        
        
            
                
            
        
    
    
    
    

提交回复
热议问题