How can I vertically center rotated text using Flexbox layout?
问题 How can I vertically center rotated text using flexbox layout? I want something that looks like this: Here's what I have so far: html, body { height: 100%; } body { background-color: #efefef; } body > div { align-content: center; background-color: white; border: 1px solid black; display: flex; height: 100%; width: 25px; } body > div > div { flex: 1; transform: rotate(-90deg); } <div> <div> Where did I go? </div> </div> 回答1: Add white-space: nowrap and center horizontally and vertically using: