I want to implement a visualization of an SVG object that is shared in several colors.
It seems something like this, this fragment of HTML + CSS reproduces.
#wholeThing { background: #000; border-radius: 30px; width: 300px; height: 100px; overflow: hidden; } #wholeThing div { float: left; height: 100%; } #foo { background: red; width: 10px; } #bar { background: green; width: 10px; } #baz { background: blue; width: 270px; } <div id='wholeThing'> <div id='foo'></div> <div id='bar'></div> <div id='baz'></div> <div id='quux'></div> </div> foreignobject tag.I tried to insert smaller rectangles into one SVG element, for example:
<svg> <rect> ... <rect> ... <rect> ... </svg> But I do not see how I can implement rounded corners with this approach. One rounded corner can cover several small rectangles, as in my example.
In addition, the SVG element does not accept the border-radius CSS property.
Maybe I could do this visualization using multi-colored stroke lines?
Source: How could I have implemented visualization in SVG with rounded corners?