1 回答
TA贡献1784条经验 获得超2个赞
这是一种使用单个grid和一点flexbox寻址较小区域的方法。
.grid-container {
display: grid;
grid-template-columns: 3fr 1fr 1fr;
}
.grid-container .item {
display: flex;
}
.right .item {
flex-direction: column;
}
.left .item {
margin-bottom: .5rem;
}
.item [type="text"] {
flex-grow: 1;
}
<div class="grid-container">
<div class="left">
<div class="item">
<button type="button">-</button>
<input type="text" value="feature">
</div>
<div class="item">
<button type="button">-</button>
<input type="text" value="feature">
</div>
<div class="item">
<button type="button">-</button>
<input type="text" value="feature">
</div>
<div class="item">
<button type="button">-</button>
<input type="text" value="feature">
</div>
<div class="item">
<button type="button">+</button>
<input type="text" value="feature">
</div>
</div>
<div class="center"></div>
<div class="right">
<div class="item">
<input type="date">
<button type="button">Borrow</button>
</div>
</div>
</div>
- 1 回答
- 0 关注
- 108 浏览
添加回答
举报