You cannot change the visual style of the various parts of the same shape in SVG (lack of Vector Effects not yet available). Instead, you will need to create separate shapes for each stroke or other visual style that you want to change.
In particular, for this case, instead of using the <rect> or <polygon> element, you can create a <path> or <polyline> that spans only three sides of the rectangle:
<path d="M50,50 L150,50 150,150 50,150" /> <polyline points="50,50 150,50 150,150 50,150" />
Here you can see the effect of these actions: http://jsfiddle.net/b5FrF/3/

For more information, read the <polyline> and the more-powerful, but more confusing <path> forms.
Phrogz Jan 23 '12 at 19:09 2012-01-23 19:09
source share