【发布时间】:2021-12-19 16:49:33
【问题描述】:
我正在使用它来使 CSS 中的内容居中:
.testclass {
display: flex;
justify-content: center;
}
但是当我想使用width 和height 缩放元素时,它不起作用并且我的元素没有居中。
像这样:
.testclass {
display: flex;
justify-content: center;
width: 200px;
height: 200px;
}
有什么问题?
【问题讨论】: