qcjdp

当 display: flex 配合 justify-content: center 使用时可以让view水平居中

而配合 align-items: center 用时可以实现垂直居中效果

 

.card-image-container{
  width: 40%;
  height: 90%;
  align-items: center;  /** 垂直居中*/
  display: flex;
  justify-content: center;   /** flex 属性, 水平居中**/
}
 
 

分类:

技术点:

相关文章:

  • 2022-01-09
  • 2021-08-31
  • 2021-06-06
  • 2021-12-13
  • 2021-10-14
猜你喜欢
  • 2022-12-23
  • 2021-11-21
  • 2021-12-22
  • 2022-12-23
  • 2021-12-05
相关资源
相似解决方案