1. 首页
  2. 网络技术
  3. 网络监控
  4. css3 flex实现div内容水平垂直居中的几种方法

css3 flex实现div内容水平垂直居中的几种方法

上传者: 2020-11-22 11:42:02上传 PDF文件 75.05KB 热度 17次
一、flex-direction: (元素排列方向) ※ flex-direction:row (横向从左到右排列==左对齐) ※ flex-direction:row-reverse (与row 相反) ※ flex-direction:column (从上往下排列==顶对齐) ※ flex-direction:column-reverse (与column 相反) 二、flex-wrap: (内容一行容不下的时候才有效) ※flex-wrap:nowrap (超出不换行,很奇怪里面的宽度会变成100%) ※ flex-wrap:wrap (超出按父级的高度平分) ※flex-
下载地址
用户评论