Flex布局
display: flex //设置 Flex 模式
flex-direction: column //决定元素是横排还是竖着排
flex-wrap: wrap //决定元素换行格式
justify-content: space-between //同一排下对齐方式,空格如何隔开各个元素
align-iterns: center //同一排下元素如何对齐
align-content: space-between //多行对齐方式
水平居中
行内元素:display: inline-block;
块级元素: margin: 0 auto;
Flex: display: flex; justify-content: center
垂直居中
行高=元素髙:line-height: height
flex: display: flex; align-item: center

Was this helpful?

0 / 0

发表回复 0

Your email address will not be published.