使用矩形或圆形时,无法在 iBooks for iPad(epub3.0 固定布局)中缩放 SVG 图像:
<svg version="1.1" viewBox="0 0 2048 2048" preserveAspectRatio="xMidYMid meet">
<g id="viewport" transform="translate(200,200)">
<g style="fill: #ffffff; stroke:#000000">
<rect width="2048" height="2048" style="fill:green; stroke:black" />
<circle cx="1024" cy="1024" r="1024" style="fill:black; stroke:black" />
<!--path d="M 0 0 H 2048 V 2048 H 0 Z"/-->
</g>
</g>
</svg>
使用路径时图像可缩放:
<svg version="1.1" viewBox="0 0 2048 2048" preserveAspectRatio="xMidYMid meet">
<g id="viewport" transform="translate(200,200)">
<g style="fill: #ffffff; stroke:#000000">
<!--rect width="2048" height="2048" style="fill:green; stroke:black" /-->
<!--circle cx="1024" cy="1024" r="1024" style="fill:black; stroke:black" /-->
<path d="M 0 0 H 2048 V 2048 H 0 Z"/>
</g>
</g>
</svg>
任何想法?
谢谢