SVG Gradient turns black when there is a BASE tag in HTML page?

后端 未结 4 638
不知归路
不知归路 2020-12-05 04:54

I am using the Raphaël JavaScript Library to create SVG elements in an HTML page and using CodeIgniter as a PHP framework. In the CodeIgniter framework I need to add a

4条回答
  •  爱一瞬间的悲伤
    2020-12-05 05:19

    SVG Gradients are defined in the document with a unique id attribute, and then referenced from another element as a URL. Typically the URL is just the identifier fragment, e.g.:

    
      ...
    
    
    

    If you introduce a element with an href attribute, you change the meaning of such URLs in the document. Instead of being computed relative to the current document, they are computed relative to the specified separate URI.

提交回复
热议问题