Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/svg/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
SVG框渲染的大小大于+;strokewidth(Firefox)_Firefox_Svg - Fatal编程技术网

SVG框渲染的大小大于+;strokewidth(Firefox)

SVG框渲染的大小大于+;strokewidth(Firefox),firefox,svg,Firefox,Svg,我使用SVG标记在html页面上绘制向量。Firefox(45.0)似乎以比预期更大的指定笔划宽度渲染线条 我准备了一个增加笔划宽度的示例,但我在Firebug或FF object inspector中看到的大小更大,p.ex box size 100+笔划宽度10导致对象大小为114。我希望是110,因为笔划以笔划宽度/2在方框的所有侧面突出 <svg> <path d="M550,10h100v100h-100z" style="stroke-width: 10;

我使用SVG标记在html页面上绘制向量。Firefox(45.0)似乎以比预期更大的指定笔划宽度渲染线条

我准备了一个增加笔划宽度的示例,但我在Firebug或FF object inspector中看到的大小更大,p.ex box size 100+笔划宽度10导致对象大小为114。我希望是110,因为笔划以笔划宽度/2在方框的所有侧面突出

<svg>
  <path d="M550,10h100v100h-100z" style="stroke-width: 10; 
        stroke-linejoin: round;" stroke="#000000" fill="#ff0000"></path>
</svg>


这是Firefox的问题吗?有解决办法吗?

您在哪里看到114?Firebug为我显示了“100px 100px”的路径。尺寸显示在布局选项卡FF Inspector:open中。将鼠标指向盒子。外形如图所示(114.183 x 114.183)。仅此而已,检查工具并非完全准确。