【发布时间】:2011-09-29 23:20:53
【问题描述】:
是否可以在 HTML/CSS 领域以编程方式在 SVG 图像上画一条线?
谢谢
编辑:到目前为止我所拥有的-
<html>
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<line x1="0" y1="10" x2="1000" y2="300" style="stroke:#006600; stroke-width:15"/>
<line x1="300" y1="0" x2="0" y2="300" style="stroke:#006600; stroke-width:15"/>
<embed src="logo.svg" width="1000" height="300" type="image/svg+xml" pluginspage="http://www.adobe.com/svg/viewer/install/"/>
</svg>
编辑:可以在加载时绘制线条(即不需要 javascript)。此外,线可以是水平的、垂直的或成角度的,例如对角线,而不必是复杂的形状。
【问题讨论】: