常用margin居中方法
.example{
width: 100px;
margin: 0 auto;
}
当我们设置position就无效了
解决方法:
.example{
position: absolute;
top: 70px;
left: 50%; //left为50%,值是固定的
width: 1264px;
margin-left: -632px; //margin-left为 -width的一半
}