2014-02-07 67 views
1

如何獲得以下形狀作爲svg圖形?我喜歡重複使用它作爲背景圖像。問題是盒子的角落。SVG條紋圖案作爲元素背景圖片

enter image description here

我不知道如何避免各行的長方形末端。

<svg xmlns="http://www.w3.org/2000/svg" width="8px" height="8px"> 
<style type="text/css"> 
    <![CDATA[ 
     path { 
      stroke-antialiasing:true 
      fill: none; 
      stroke: #000; 
      stroke-width: 2px; 
      opacity: 0.1; 
     } 
    ]]> 
</style> 
<path d="M4 0 0 4"/> 
<path d="M8 4 4 8"/> 

預覽

enter image description here

回答

2

默認中風的linecap是「對接」, 添加到uour風格: 中風的linecap:方;