SVG rect border width
Asked Answered
K

2

16

Is it possible to manipulate SVG rect's borders in the same way as it border-left-width, border-right-width and so on does?

Kirstenkirsteni answered 16/7, 2011 at 11:25 Comment(2)
What do you mean by the rect's borders? Do you mean the stroke properties? That definitely can't be done. I'm pretty sure you can't selective change the left or right parts of the rect (other than their position).Ethology
Yes, I mean the stroke properties of the borders. You can put it as the answer and I'll accept it.Kirstenkirsteni
E
12

Since you asked, the answer, I'm afraid is no. If you want to selectively change the sides of a rectangle, you'll have to draw it as four separate lines.

Ethology answered 16/7, 2011 at 21:58 Comment(0)
N
16

try this and change it as yours.

<svg width="400" height="110"> 
   <rect width="300" height="100" style="fill:rgb(0,0,255);stroke-width:3;stroke:rgb(0,0,0)" /> 
</svg>
Nasia answered 8/9, 2017 at 14:41 Comment(1)
Can you control which side has the border? e.g if someone only wanted a border on the top, left and right.Heilbronn
E
12

Since you asked, the answer, I'm afraid is no. If you want to selectively change the sides of a rectangle, you'll have to draw it as four separate lines.

Ethology answered 16/7, 2011 at 21:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.