目录
一个练习flex
布局的小游戏网站
justify-content
justify-content
属性定义了浏览器之间,如何分配顺着弹性容器主轴(或者网格行轴) 的元素之间及其周围的空间。
下面例子中的青蛙为flex
布局
flex-start
:项目与容器的左侧对齐。
{
justify-content: flex-start
}
flex-end:项目与容器的右侧对齐。
{
justify-content:flex-end
}
center:项目在容器的中心对齐。
{
justify-content: center
}
space-between:项目以相等的间距显示。
{
justify-content: space-between
}
space-around:项目以等间距显示。
{
justify-content: space-around
}
align-items
align-items