【问题标题】:Firefox boxes Inkscape SVG elementsFirefox 框 Inkscape SVG 元素
【发布时间】:2013-06-28 21:10:53
【问题描述】:

所以,我意识到 SVG 支持并不是普遍的,可能需要一段时间才能实现,而且我不应该期望完美,但是在渲染我认为非常简单的 SVG,我想知道是否有人以前遇到过类似的错误。 在火狐中

在 Chrome 中

如果需要,我可以发布所有 xml,但它很长,我觉得它可能比有用更令人困惑。我相信这是一个有代表性的sn-p,但如果有帮助,我可以添加更多:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->

<svg
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:cc="http://creativecommons.org/ns#"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:svg="http://www.w3.org/2000/svg"
   xmlns="http://www.w3.org/2000/svg"
   version="1.1"
   width="15"
   height="15"
   id="svg3039">
  <metadata
     id="metadata3045">
    <rdf:RDF>
      <cc:Work
         rdf:about="">
        <dc:format>image/svg+xml</dc:format>
        <dc:type
           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
        <dc:title></dc:title>
      </cc:Work>
    </rdf:RDF>
  </metadata>
  <defs
     id="defs3043">
    <linearGradient
       id="linearGradient3962">
      <stop
         id="stop3970"
         style="stop-color:#ffffff;stop-opacity:0.79824561"
         offset="0" />
      <stop
         id="stop3966"
         style="stop-color:#ffffff;stop-opacity:0.56140351"
         offset="1" />
    </linearGradient>
    <linearGradient
       id="linearGradient3942">
      <stop
         id="stop3944"
         style="stop-color:#ffffff;stop-opacity:1"
         offset="0" />
      <stop
         id="stop3946"
         style="stop-color:#ffffff;stop-opacity:0"
         offset="1" />
    </linearGradient>
    <filter
       color-interpolation-filters="sRGB"
       id="filter3781">
      <feGaussianBlur
         id="feGaussianBlur3783"
         stdDeviation="0.1674635" />
    </filter>
    <filter
       color-interpolation-filters="sRGB"
       id="filter3785">
      <feGaussianBlur
         id="feGaussianBlur3787"
         stdDeviation="0.09938691" />
    </filter>
  </defs>
  <path
     d="m 10.839416,5.7481751 a 4.7846713,4.7846713 0 1 1 -9.5693426,0 4.7846713,4.7846713 0 1 1 9.5693426,0 z"
     id="path3055"
     style="fill:#000000;fill-opacity:0;fill-rule:evenodd;stroke:#adadad;stroke-width:1.89999998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;filter:url(#filter3781)" />
  <path
     d="m 8.5182482,10.313869 c 0,0 2.1590598,1.881089 2.9343068,2.540146 0.775247,0.659057 1.315147,1.217617 2.102189,1.116788 0.363811,-0.04661 0.706204,-0.3928 0.81022,-0.744526 0.132545,-0.448193 -0.0219,-1.007299 -0.350365,-1.357664 C 13.686132,11.518248 10.40146,8.5182482 10.40146,8.5182482 z"
     id="path3950"
     style="fill:#adadad;fill-opacity:1;stroke:#adadad;stroke-width:0.1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.88627451;stroke-dasharray:none;filter:url(#filter3785)" />
</svg>

【问题讨论】:

  • 请发布完整的 xml
  • 这是jsfiddle.net/gEbZE 的一个小插曲,但我看不到那个问题。 Firefox 似乎确实比其他浏览器剪掉了更多的内容,但在所有浏览器中都部分剪掉了模糊。
  • @ErikDahlström 那里的问题已被忽略,但仍然可见。问题是 svg 元素上有一个可见的边界框。穿过图像的白线也是同样的问题。
  • @WebChemist 已发布完整的 XML。
  • 我的 Firefox nightly 中没有看到任何白线,您在哪个版本中看到?

标签: xml firefox svg cross-browser


【解决方案1】:

您可以尝试通过“另存为”功能另存为纯 SVG 来删除 sodipodi 命名空间的内容,这有时会导致问题。其他关于制作网络安全 svg 的提示在 the inkscape manual

【讨论】:

  • 感谢您的建议,但遗憾的是错误仍然没有改变。更新 xml 以反映更改。
  • 原来是一个非常本地化的问题,这对其他事情来说是一个非常有用的答案。
  • 没有解决问题。
  • 是的,这是一个猜测……结果似乎是 FF 中的一个错误。但是对安全 SVG 的引用很有用。
猜你喜欢
  • 2022-11-15
  • 2013-07-07
  • 2014-06-01
  • 1970-01-01
  • 2019-06-07
  • 1970-01-01
  • 2012-04-08
  • 1970-01-01
  • 2019-01-28
相关资源
最近更新 更多