如何从svg行中删除模糊

时间:2016-03-01 12:15:01

标签: svg line

我有两条线第一条线不平滑(模糊)。线条流畅。我怎样才能使它平滑。



<svg height="210" width="500">
  <line x1="0" y1="0" x2="200" y2="10" style="stroke:rgb(255,0,0);stroke-width:2" />
<line x1="0" y1="0" x2="200" y2="200" style="stroke:rgb(255,0,0);stroke-width:2" />
  Sorry, your browser does not support inline SVG.
</svg>
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:1)

我不太了解你在光滑和模糊之间的区别,但你可以使用shape-rendering =&#34; crispEdges&#34;摆脱形状上的抗锯齿。

&#13;
&#13;
<svg height="210" width="500" shape-rendering="crispEdges">
  <line x1="0" y1="0" x2="200" y2="10" style="stroke:rgb(255,0,0);stroke-width:2" />
<line x1="0" y1="0" x2="200" y2="200" style="stroke:rgb(255,0,0);stroke-width:2" />
  Sorry, your browser does not support inline SVG.
</svg>
&#13;
&#13;
&#13;