<svg xmlns="http://www.w3.org/2000/svg" width="1200px" height="250px" viewBox="0 0 400 250" id="RoomsSVG">
<svg id="Room101" width="400px" height="250px" x="0px" y="0px">
<rect id="Room101Rect" width="100%" height="100%" fill="orange" stroke="black" stroke-width="5" />
<text id="Room101Label" font-size="24pt" x="55px" y="100px" fill="black">Room 101</text>
<text id="Room101Type" font-size="24pt" x="55px" y="150px" fill="black">Standard office</text>
</svg>
<svg id="Room102" width="400px" height="250px" x="400px" y="0px">
<rect id="Room102Rect" width="100%" height="100%" fill="orange" stroke="black" stroke-width="5" />
<text id="Room102Label" font-size="24pt" x="55px" y="100px" fill="black">Room 102</text>
<text id="Room102Type" font-size="24pt" x="55px" y="150px" fill="black">Standard office</text>
</svg>
<svg id="Room103" width="400px" height="250px" x="800px" y="0px">
<rect id="Room103Rect" width="100%" height="100%" fill="orange" stroke="black" stroke-width="5" />
<text id="Room103Label" font-size="24pt" x="55px" y="100px" fill="black">Room 103</text>
<text id="Room103Type" font-size="24pt" x="55px" y="150px" fill="black">Standard office</text>
</svg>
</svg>
当我试图在外部svg标签上使用viewBox属性时,viewBox不裁剪视口,但只是移动儿童的位置。 我想通过使用viewBox和儿童的位置隐藏溢出的子内容。 我的代码有什么问题? plz帮助我。svg viewBox属性移动儿童位置