假设我有一个Flex布局,并想使其可调整大小。
我希望能够通过水平拖动边框来调整一个div的大小。
请看这个Fiddle。
HTML
我希望能够通过水平拖动边框来调整一个div的大小。
请看这个Fiddle。
HTML
#main {
display: flex;
justify-content: space-between;
height: 100vh;
.flex {
width: 100%;
&:nth-child(2) {
background: red;
overflow: auto; resize: horizontal;
}
}
}
<div id="main">
<div class="flex">ABC</div>
<div class="flex">
DEF
</div>
<div class="flex">GHI</div>
</div>
我该怎么做?
overflow: auto; resize: both;
吗?这应该可以解决问题,但在使用 flexbox 模型的元素上可能会有些奇怪的表现。 - Hidden Hobbes