dongli8862 2014-02-15 11:17
浏览 50
已采纳

为什么这个svg在不同的上下文中呈现不同?

I have the following SVG: http://bensouthgate.com/i/malthus2.svg

Which shows b(y) = d(y)

However, when I embed it in a page: http://bensouthgate.com/p/malthus.php

it shows b(y) = f(y) among other mistakes.

The way I am including it in the page is

<?php include '../i/malthus2.svg'; ?>

What is going on?

Edit: SVG was rendered here -> http://www.tlhiv.org/ltxpreview/

  • 写回答

2条回答 默认 最新

  • douxieshang5577 2014-02-15 11:28
    关注

    You're embedding more than one SVG directly within your HTML document and therefor the IDs of the various glyphs aren't unique anymore. The ID of the letter d in your second math-SVG is glyph0-2 but glyph0-2 is already defined in your first math-SVG for the letter f.

    You have to ensure that all your IDs are absolutely unique if you want to include your SVGs directly in your HTML document.

    An alternative would be to include the SVGs via the <img> tag.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部