完美的SVG路径?

时间:2016-02-16 16:49:18

标签: svg vector graphics adobe-illustrator

我尝试制作一个cleran短代码SVG Graphic ...但我每次都得到丑陋的边界......

代码:

<svg xmlns="http://www.w3.org/2000/svg" version="1.1" x="0" y="0" viewBox="0 0 370 192" xml:space="preserve">
<polygon class="shape1" points="0 158 0 0 160 0 258 90 "/>
<polygon class="shape2" points="370 192 370 0 160 0 "/>
</svg>

我现在尝试编辑Adome Illustrator中的协调并手工编写......但没有机会... = /也许有人有想法?

在这里你可以看到我让Borders将SVG改为:http://i.imgur.com/sJpvDL2.png

1 个答案:

答案 0 :(得分:1)

浏览器在坐标方面存在一些舍入问题,这就是为什么你会得到那些小的白线。

为防止侧面出现白线,可以使用出血,以下示例不包含出血。

有两种解决方案。

  1. 合并多边形
    在最新的Illustrator内 - &gt;档案 - &gt;出口 - &gt;选择SVG作为格式
  2. <svg xmlns="http://www.w3.org/2000/svg" version="1.1" x="0" y="0" viewBox="0 0 370 192" xml:space="preserve">
    <polygon class="shape1" points="0 158 0 0 370 0 370  192 258 90 "/>
    </svg>

    1. 使多边形相互重叠
      <svg xmlns="http://www.w3.org/2000/svg" version="1.1" x="0" y="0" viewBox="0 0 370 192" xml:space="preserve">
      <polygon class="shape1" points="0 158 0 0 370 0 370  192 258 90 "/>
      <polygon class="shape2" points="370 192 370 0 160 0 "/>
      </svg>