css - 容器内的弹性尺寸项目
问题描述
我有一个容器,里面有 3 次潜水,里面有内容。
item1 = 50%
item2 = should shrink according to the left over space.
item3 = 33%
我试图让 item2 缩小到左边的空间。
I was using width = min-content on item2 but this doesn't work in IE11
所以我试图找到一种方法来完成这项工作。
.container {
display: flex;
justify-content: flex-start;
}
.item1 {
width: 50%;
}
.item2 {
width: auto;
}
.item3 {
width: 33%;
}
我尝试使用 flex-shrink 但不完全了解这是否有助于 IE。如果 item3 不在容器中,那么 item2 应该占据另外 50%。
解决方案
推荐阅读
- javascript - 将属性添加到字符串
- firebase - 如何列出用户可以从 Firestore 集合中读取的所有文档?
- google-api - Google API 给出未经授权的令牌错误
- java - 获得多点路线
- javascript - THREE.js:两个镜头位置相同的场景
- jquery - 使用他的索引删除一行
- arrays - 如何在 Robot 框架中将 Get Text 值转换为 ArrayList
- javascript - 当 div 重叠时,事件停止传播不适用
- javascript - 在 $.each 中的数组中推送对象
- html - 如何以角度材料形式添加自定义选择文件以进行文档上传