小程序技巧 盒子布局

/* flex布局 弹性盒子模型*/
1.把容器diaplay:flex
2.把容器flex-firection:column
3.把容器元素居中align-items: center;
 
头像和昵称的那种水平居中
/*垂直居中 弹性盒子模型*/
 display: flex;
flex-direction: row;
align-items: center; 

猜你喜欢

转载自www.cnblogs.com/joer717/p/10598060.html