相对位置设置居中
第一种,最为简洁,不过边距只能是0了
margin: 0 auto;
在html文件的style中再设置边距
在固定宽高的时候使用
第二种:推荐,灵活,可以避免第一种不能设置边距的麻烦
justify-content: center; display: flex; align-items: center;
居右
float:right
固定位置,例子是固定底部居中
position: absolute;
left: 0;
right: 0;
margin: auto;
bottom: 0;