【问题标题】:SVG/Inkscape - "Failed to load the requested file"SVG/Inkscape - “无法加载请求的文件”
【发布时间】:2020-05-31 01:31:18
【问题描述】:

希望有人知道 SVG 文件。我正在浏览有关 SVG 图形的 Mozilla 教程,其中一个练习是查看以下代码:

<?xml version="1.0" standalone="no"?>
<svg width="200" height="280" xmlns="http://www/w3.org/2000/svg" version="1.1">
    <polyline points="40 60 80 20 120 60" stroke="black" stroke-width="20"
                stroke-linecap="butt" fill="none" stroke-linejoin="miter"/>
    <polyline points="40 160 80 120 120 160" stroke="black" stroke-width="20"
                stroke-linecap="round" fill="none" stroke-linejoin="round"/>
    <polyline points="40 260 80 220 120 260" stroke="black" stroke-width="20"
                stroke-linecap="square" fill="none" stroke-linejoin="bevel"/>
</svg>

它应该创建一个向上的三个角度的图形。 我有 8 个其他 SVG 文件可以毫无问题地转换为 Inkscape。但是上面代码中的图形不会转换为 Inkscape,Inkscape 给我这个错误:“加载请求的文件失败” 有什么我想念的吗?我尝试更改代码中的所有参数,认为图形可能太大但仍然无法正常工作。

【问题讨论】:

  • 我刚刚创建了另一个 SVG 文件,它毫无问题地转换为 Inkscape:&lt;svg width="200" height="150" xmlns="http://www.w3.org/2000/svg" version="1.1"&gt; &lt;path d="M 10 75 Q 50 10 100 75 T 190 75" stroke="black" stroke-linecap="round" stroke-dasharray="5,10,5" fill="none"/&gt; &lt;path d="M 10 75 L 190 75" stroke="red" stroke-linecap="round" stroke-width="1" stroke-dasharray="5,5" fill="none"/&gt; &lt;/svg&gt;
  • Inkscape 应该能够读取折线,但不能写入它们。您能否确认 Inkscape(哪个版本?)不读取折线?

标签: html svg inkscape


【解决方案1】:

好吧,我回答了我自己的问题。我将 SVG 文件转换为 HTML,然后在浏览器中打开文件并显示图形!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-05-25
    • 2018-07-20
    • 1970-01-01
    • 1970-01-01
    • 2013-01-05
    • 2014-01-18
    • 2018-08-25
    • 2017-09-22
    相关资源
    最近更新 更多