6
除了使用多邊形中的「填充」之外,是否有任何方法使四個點之間的區域着色? 我畫用四條線作爲着色svg中四條線之間的區域
<line x1="0" y1="0" x2="300" y2="0" style="stroke:rgb(255,0,0);stroke-width:2"></line>
<line x1="300" y1="0" x2="300" y2="150" style="stroke:rgb(255,0,0);stroke-width:2"></line>
<line x1="300" y1="150" x2="0" y2="150" style="stroke:rgb(255,0,0);stroke-width:2"></line>
<line x1="0" y1="150" x2="0" y2="0" style="stroke:rgb(255,0,0);stroke-width:2"></line>
多邊形,和我想要的顏色,這些線之間的區域。
我已經得到了答案。謝謝你的幫助。 – 2013-05-17 09:14:47
請注意,即使使用'rect','polyline'或甚至'polygone'繪圖,'path'也可以完成這項工作。查看有關SVG元素和形狀的好教程http://tutorials.jenkov.com/svg/index.html,以及更多「原始」文檔https://developer.mozilla.org/zh-CN/docs/網絡/ SVG – 2014-06-16 13:22:26