flex-end和end之间的区别? [英] Difference between flex-end and end?
问题描述
当我使用css属性 align-items
时,我看不到 flex-end $ c $的值有任何视觉差异。 c>或
end
的值。
When I use the css property align-items
, I cannot see any visual difference with the value of flex-end
or value of end
.
align-items和有什么区别:结束
和 align-items:flex-end
?
推荐答案
一个值( end
)在CSS 框对齐规范,旨在应用于多个框布局模型(块,表,网格,伸缩等)
One value (end
) is defined in the CSS Box Alignment specification, and is intended to apply to multiple box layout models (block, table, grid, flex, etc.)
另一个值( flex-end
)在CSS flexbox规范,并且仅适用于flex布局。
The other value (flex-end
) is defined in the CSS flexbox specification, and is intended to apply only to flex layout.
对于Box Alignment规范,W3C是尝试建立一种通用语言来对齐CSS中的框。最终,框对齐值将取代在flex,grid和其他规格中定义的特定值。
With the Box Alignment spec, the W3C is attempting to establish a universal language for the alignment of boxes in CSS. Eventually, the Box Alignment values will supersede the particular values defined in flex, grid and other specs.
例如:
-
end
将代替flex-end
使用 -
列空白
将代替grid-column-gap
- ,依此类推。
end
will be used instead offlex-end
column-gap
will be used instead ofgrid-column-gap
- and so on.
许多Box Alignment值已在主要浏览器中使用。但是完整的实现还有一段路要走,因此使用 flex-end
而不是 end
(然后
Many Box Alignment values are already in use across major browsers. But full implementation is still a ways off, so it's still safer to use flex-end
instead of end
(and then count on long-term support for legacy names).
以下是Box Alignment规范中的一个示例:
Here's an illustration from the Box Alignment spec:
§ 8.3。旧版间隙属性:
grid-row-gap
,
<$ c $ grid-column-gap 和grid-gap
属性
网格布局模块最初是用其自身的装订线属性集编写的,所有这些属性都统一到现有的行空白
/ 列空白
命名中。为了与遗留内容兼容,必须将那些遗留属性
名称用作别名:
The Grid Layout module was originally written with its own set of gutter properties, before all such properties were unified into the existing row-gap
/ column-gap
naming. For compatibility with legacy content, those legacy property
names must be supported as aliases:
-
grid-row-gap
必须视为row-gap
属性的简写
grid-column-gap
必须视为 column-gap
$ b的简写$ b属性
grid-column-gap
must be treated as a shorthand for the column-gap
property
网格空白
必须视为 gap
属性
在所有这三种情况下,旧属性必须采用相同的语法
作为其别名的属性,然后将值转发到其别名属性
。
In all three cases, the legacy properties must take the same grammar as the property they are aliasing, and just "forward" the value to their aliased property.
这篇关于flex-end和end之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!