摘要: display:flex; align-items://水平对齐方式 justify-content://垂直对齐方式 flex://盒子所占大小(如果你盒子里面只有两个div,那么你设置其中之一个flex,那么另外一个会自动填充) 阅读全文
posted @ 2016-08-01 17:49 Seaurl 阅读(287) 评论(0) 推荐(0) 编辑
摘要: 我是通过flex的水平垂直居中噢! html,body{ width: 100%; height: 200px; } .parent { display:flex; align-items: center;/*垂直居中*/ justify-content: center;/*水平居中*/ width:100%; height:100%; backgro... 阅读全文
posted @ 2016-08-01 10:07 Seaurl 阅读(387) 评论(0) 推荐(0) 编辑