我使用 flex 容器对齐块。原来是这样的情况:
当其中一个文本移动到下一行时,所有其他块也变得更高,而文本仍然在顶部,它需要位于中心。你能告诉我如何将这些块中的文本与垂直中心对齐吗?

编码:
<div style="padding: 15px; text-align: center; font-weight: bold; background: black; color: white; flex-wrap: wrap; display: flex; justify-content: space-around; ">
<div style="width: 20%; text-align: center; border: 1px solid red;">NATIVE GROUP HDHFJFJFJFJF DJRKTKTK</div>
<div style="width: 20%; text-align: center; border: 1px solid red">КУРСЫ</div>
<div style="border: 1px solid red; width: 20%; text-align: center; padding: 2px; border: 1px solid #1AB488; border-radius: 20%; color: #1AB488">Sign Up</div>
</div>
1 个回答