我正在开发Chrome扩展,这样我就可以使用诸如flexbox这样的尖端技术:
小提琴
<label for="example-search">Classic search example</label>
<div class="input-wrapper">
<input type="text" id="example-search" />
<button>Search</button>
</div>.input-wrapper {
display: flex;
flex-flow: row nowrap;
}
.input-wrapper > input {
flex: 1 1 auto;
}
.input-wrapper > button {
flex-shrink: 0;
}我有两个问题:
使用柔性箱生产:
我最近发现了一篇关于我的问题的好文章:现实世界中的柔性盒
来自atricle的未经加工的内奸:
发布于 2014-03-23 00:50:05
除非您要覆盖其他地方设置的属性,否则没有理由使用这一行,因为这是所有flex容器的默认设置:
flex-flow: row nowrap;如果您的目标是在浏览器上使用旧的Flexbox实现之一,那么有两件事需要注意:
flex: 1 1 auto转换为box-flex: 1是可以的,但是您不能翻译类似flex: 1 0的东西(带有前缀)。就您的目的而言,box-flex: 0应该可以工作(尽管您可能在旧Webkit浏览器中的按钮有问题,请参阅:https://stackoverflow.com/questions/16961192/flexbox-doesnt-work-with-buttons)。https://codereview.stackexchange.com/questions/45099
复制相似问题