1元素为行内元素,设置父元素 text-align:center
2元素固定宽度,可设置左右 margin:auto
3元素为绝对定位,设置符元素position为relative,元素设置left:0;
right:0;margin:auto;
4使用弹性盒子flex-box布局,指定justify-content 属性为center
5display设置为table-ceil
1元素为行内元素,设置父元素 text-align:center
2元素固定宽度,可设置左右 margin:auto
3元素为绝对定位,设置符元素position为relative,元素设置left:0;
right:0;margin:auto;
4使用弹性盒子flex-box布局,指定justify-content 属性为center
5display设置为table-ceil