CSS3 Flex 可以只接受整数值吗?

Dro*_*dOS 4 css flexbox

我经常使用 CSS3 flexboxes - 它们可以实现简单、灵活的布局。CSS沿线

-webkit-box-flex: 4;
-moz-box-flex: 4;
-ms-flex: 4;
-webkit-flex: 4;
flex: 4;
Run Code Online (Sandbox Code Playgroud)

从来都不是问题。但是,我现在遇到了需要提供浮点值的情况。我的意思是

-webkit-box-flex: 4.1;
-moz-box-flex: 4.1;
-ms-flex: 4.1;
-webkit-flex: 4.1;
flex: 4.1;
Run Code Online (Sandbox Code Playgroud)

一个快速而肮脏的实验测试 - 在控制台中对 CSS 进行热编辑,然后在 Chrome 和 Firefox 中使用 PicPick 像素标尺测量宽度 - 表明这是有效的。但是,我找不到任何明确的信息 - 我尝试了 W3C 文档,但发现它们有点密集。在这个问题上,永远可靠的caniuse也没有完全澄清这一点。这里有人能告诉我这样的分数值是否可以安全地用于当今大多数最新的主流浏览器?

kRI*_*ST- 7

根据Mozilla的文档,https://developer.mozilla.org/en-US/docs/Web/CSS/flex,花费值-包括根据MDN文档的非整数。所有有效的数值:

12          A raw <integer> is also a <number>
4.01        A positive non-integer <number>
-456.8      Negative non-integer <number>
0.0         Zero
+0.0        Zero, with a leading +
-0.0        Zero, with a leading - (Though strange, this is an allowed value)
.60         Digits are optional before the dot
10e3        The scientific notation is allowed
-3.4e-2     Most complex case of scientific notatio
Run Code Online (Sandbox Code Playgroud)