dongshi1606 2012-07-18 09:37
浏览 85

SVG外部链接适用于Chrome但不适用于Safari(WebKit)

I'm working on a php project that needs to display different SVG images depending on a variable. The image is displayed in a iFrame like this:

<iframe name="dispFrame" id="dispFrame" src="<?php echo $svgPath; ?>" frameborder="0">
</iframe>

where $svgPath is the path of the SVG file. This SVG file uses external references to another SVG to include some of its elements (it's a sort of library of pre-made elements). Example:

<use xlink:href="../library.svg#bluebox"  x="200" y="280"/>

This works fine with Firefox and Chrome, but for some reason it doesn't in Safari. In Safari the main SVG file is displayed but without the element linked from the external library.
I've read that used to be an issue of WebKit (on which both Chrome and Safari are based), but apparently WebKit says it is solved now. I'm not sure then why in Chrome works fine and in Safari doesn't.
Any idea of what I can do to make it work on Safari as well?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 c程序不知道为什么得不到结果
    • ¥40 复杂的限制性的商函数处理
    • ¥15 程序不包含适用于入口点的静态Main方法
    • ¥15 素材场景中光线烘焙后灯光失效
    • ¥15 请教一下各位,为什么我这个没有实现模拟点击
    • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
    • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
    • ¥20 有关区间dp的问题求解
    • ¥15 多电路系统共用电源的串扰问题
    • ¥15 slam rangenet++配置