盒子水平垂直居中的几种方式 呀Y 2022-04-19 93 阅读1分钟 1,父相子绝,top:50%,left:50%,使用margin负值移动盒子自身的一半 2,使用transform移动(百分比) 3,flex布局