user3658423
user3658423

Reputation: 1944

svg rect multiple fill colors

I have a svg rect element. I have "fill: rgb(31, 119, 180);" which renders the rect on the left side of image below.

How can I set the rect style to render the multiple borders like the one on right?

enter image description here

Upvotes: 1

Views: 2316

Answers (1)

maxedison
maxedison

Reputation: 17553

This isn't possible. Instead, you could use a second rectangle. The first one would have a white background with a black border, and the interior one would be blue. Or the first one could just be black, and the interior one would be blue with a white stroke.

Upvotes: 4

Related Questions