摘要: 水平居中(包含块中居中)1. 定宽,左右margin为auto。(常规流块盒、弹性项目[不用定宽]) 例子:在box1盒子上设置宽,再设置margin:auto; 得到的效果: 2. 弹性盒设置justify-content: center,让弹性项目在主轴上居中。(普遍适应) 例子:在其父元素上设 阅读全文
posted @ 2019-09-22 18:11 太微 阅读(3119) 评论(0) 推荐(0) 编辑