例如WIDTHOUT我们有DEFS和矩形分开,所以我们必须使用IDSVG使用的ID
<defs>
<linearGradient id="MyGradient">
<stop offset="0%" stop-color="#000" />
<stop offset="100%" stop-color="#fff" />
</linearGradient>
</defs>
<rect x="0" y="0" width="256" height="32" fill="url(#MyGradient)"/>
我怎么可以这样做,但没有使用ID(MyGradient)。也许用JavaScript?
像这样
<rect x="0" y="0" width="256" height="32">
<linearGradient>
<stop offset="0%" stop-color="#000" />
<stop offset="100%" stop-color="#fff" />
</linearGradient>
</rect>
不工作:(
这将(大致)在XAML中可能,但不在SVG中。 – Joey 2011-01-08 14:05:10