align-content
,align-content
和justify-content
将justify-content
描述为它们的可能值之一。虽然justify-items
与justify-items
或baseline
一起使用时很有意义,但我不知道它如何与baseline
,align-items
,align-self
和justify-content
属性一起使用。您有什么建议吗? justify-items
没有基线如果检查justify-self
,您会发现align-content
没有justify-content
值
the actual Flexbox specification
在不久的将来,并且按照baseline
的定义,我们将有更通用的方式来对齐元素,即使justify-content
的值不是Value: flex-start | flex-end | center | space-between | space-around
的无效值,也是如此
顺便说一下,新规范中的baseline
有justify-content
:Value: normal | <content-distribution> | <overflow-position>? [ <content-position> | left | right ] <content-distribution> = space-between | space-around | space-evenly | stretch <overflow-position> = unsafe | safe <content-position> = center | start | end | flex-start | flex-end
,但是此属性在实际的Flexbox规范中不存在(与baseline
相同)相关:
justify-items
[https://drafts.csswg.org/css-align-3/#propdef-justify-items不接受Flexbox(
justify-self
)的In CSS Flexbox, why are there no "justify-items" and "justify-self" properties?,但在align-content
中接受
同样适用于CSS网格,但是您可以在此处找到baseline
和https://drafts.csswg.org/css-flexbox-1/#align-content-property:the New Specification实际上,我没有一个清晰的示例来说明具有这些属性的
justify-items
,但我可以肯定,在大多数情况下,它将考虑Spec中定义的后备值: