.container{display: flex;justify-content: center;aligin-items: center;}
垂直居中当内容超过container,上方会超出容器
设置
.item{margin: auto;}
或:
justify-content: safe centeralign-self: safe center
时间:2023-12-08 16:16:10
.container{display: flex;justify-content: center;aligin-items: center;}
垂直居中当内容超过container,上方会超出容器
设置
.item{margin: auto;}
或:
justify-content: safe centeralign-self: safe center