更改SVG形状的厚度

时间:2016-06-07 19:08:16

标签: html5 svg

我对svg绘图不够熟悉。

我有SVG格式的箭头。如何增加箭头的厚度?



CREATE TABLE #counts
(
    table_name varchar(255),
    row_count int
)

EXEC sp_MSForEachTable @command1='INSERT #counts (table_name, row_count) SELECT ''?'', COUNT(*) FROM ?'
SELECT table_name, row_count FROM #counts  where table_name like 'BB%' ORDER BY table_name, row_count DESC




提前致谢

3 个答案:

答案 0 :(得分:16)

您可以使用stroke="black" stroke-width="10"添加笔划,然后相应地调整viewBox。

OLD:
<div style="width: 100px; height:100px;">
  <svg viewBox="0 0 100 100">
    <path d="M 50,0 L 60,10 L 20,50 L 60,90 L 50,100 L 0,50 Z" class="arrow" transform="translate(85,100) rotate(180)"></path>
  </svg>
</div>
<br>
NEW:
<div style="width: 100px; height:100px;">
  <svg viewBox="-10 -10 120 120">
    <path d="M 50,0 L 60,10 L 20,50 L 60,90 L 50,100 L 0,50 Z" class="arrow" transform="translate(85,100) rotate(180)" stroke="black" stroke-width="10"></path>
  </svg>
</div>

答案 1 :(得分:0)

您可以使用 CSS 调整 strokestroke-width

div svg path {
  stroke: #000000;
  stroke-width: 3px;
}

答案 2 :(得分:0)

stroke 应该是背景颜色,stroke-width 应该是 1 到 2 之间

 svg path {
      stroke: #ffffff; /* Background color against your svg */
      stroke-width: 1px; /*Between 1px and 2px*/
    }
相关问题