如果单击按钮时列的宽度减小,我正在尝试垂直对齐网格列内的文本。
这是Hierarchy这个词的原始对齐方式
当我单击按钮时,列的宽度会发生变化。我得到这样的输出。
这里层次结构应该旋转,它应该垂直对齐
它应该是这样的
这是我的代码
.web_hierarchy {
display: grid;
margin-left: 10px;
margin-right: 10px;
margin-top: 10px;
margin-bottom: 10px;
grid-template-columns: 45px 45px 1fr 200px;
grid-template-rows: 450px 200px;
grid-template-areas:
"sidebar hierarchy build inspector"
"sidebar hierarchy assets inspector";
border: 2px solid black;
}
.hierarchy {
grid-row-end: span 2;
background-color: #ffe5b4;
border-right: 1px solid black;
display: flex;
justify-content: center;
align-items: flex-start;
}