【发布时间】:2022-11-29 11:40:36
【问题描述】:
我正在尝试获取附加的结果。 (https://i.stack.imgur.com/WjMrN.png) 整个页面采用网格布局。
每次我尝试将高度调整为 100% 以尝试填充选项卡 div 框时,它都会像这样溢出 (https://i.stack.imgur.com/9nXRN.png)。
.tabs{
display: inline-block;
font-size: 20px;
}
.prints {
display: inline-block;
background: black;
width: 100%;
height: 100%;
color: #ffffe6;
transform: rotate(90deg);
text-align: center;
top: 7%;
}
.shop{
display: inline-block;
background: #e95514;
color: black;
transform: rotate(90deg);
top: 85%;
text-align: center;
}
<div class="tabs">
<div class="prints">
PRINTS
</div>
<div class="shop">
SHOP
</div>
</div>
【问题讨论】: