居中:
1.margin:auro和position:absolute/fixed;
left:0;right:0;top:0;bottom:0;
2.负margin position
3.transform
4.两个盒子等宽,嵌套,外部盒子margin:auto;内部margin-left:-50%;
居中:
1.margin:auro和position:absolute/fixed;
left:0;right:0;top:0;bottom:0;
2.负margin position
3.transform
4.两个盒子等宽,嵌套,外部盒子margin:auto;内部margin-left:-50%;
转载于:https://www.cnblogs.com/meij/p/5205782.html