【发布时间】:2017-08-16 17:21:51
【问题描述】:
谷歌浏览器 60.0.3112.90
我学习 SVG。为什么svg real 尺寸不是10cm x 10cm,圆圈stroke-width 不是1pt 和radius 不是2.5cm?
.svg-container, .canvas{
margin: 0;
padding: 0;
width: 10cm;
height: 10cm;
background-color: green;
}
.geometry {
stroke: gray;
fill: yellow;
stroke-width: 1px;
}
<div class='svg-container'>
<svg class='canvas' viewBox='0 0 10 10'>
<circle class='geometry' cx='5' cy='5'
r='2.5'/>
</svg>
</div>
【问题讨论】: