SVG filter in external file not being applied

前端 未结 1 406
花落未央
花落未央 2020-12-11 16:52

In a file named gray.svg in my assets directory I have



        
1条回答
  •  天命终不由人
    2020-12-11 17:25

    Looks like you've discovered this bug in Chromium:

    Issue 109212: SVG (filter | fill | stroke | clip-path | mask) from external files not applied

    What steps will reproduce the problem?

    1. Define a filter in an SVG file, assign it an ID.
    2. Embed some SVG in an HTML file.
    3. Use the CSS directive "filter: url(file#id)" to reference the filter in the SVG file.

    What is the expected result? The filter should be applied.

    What happens instead? No filter is applied.

    Your example works correctly in Firefox.

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