再wxss里写 display: flex; align-items: center; justify-content: center; text-align: center; 前三句是为了上下居中 第四句是水平居中。