我为所有矩形设置rx =“ 3” ry =“ 5”,但外观不同取决于缩放比例100%,为什么?有任何想法吗?
顶部:
<rect x="217.5" y="-8" style="fill:white;stroke-width:1;stroke:rgb(0,0,0)"
width="45px" height="27px" rx="3" ry="5">
</rect>
<rect x="167.5" y="-8" viewBox="0 0 100 100" rx="3" ry="5"
style="fill:white;stroke-width:1;stroke:rgb(0,0,0)" width="45px" height="27px">
</rect>
右:
<rect rx="3" ry="5" x="356" y="73" style="fill:white;stroke-width:1;stroke:rgb(0,0,0)"
width="45px" height="27px" viewBox="0 0 100 100"></rect>
我使用<foreignObject>
解决了此问题
<foreignObject x="356" y="73" width="50px" height="40px">
<div style="background-color:white; width:45px; height:27px; border-radius:4px; border:1px solid black;"></div>
</foreignObject>