栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

flexbox容器中的省略号

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

flexbox容器中的省略号

最终可以追溯到Firefox Nightly中的最新更改。长话短说,选择器

min-width:0
上的设置
.column
将使其按预期工作。

在这里可以找到更全面的答案。注意:

“基本上:弹性项目将拒绝收缩到其最小固有宽度以下,除非您在其上明确指定“最小宽度”或“宽度”或“最大宽度”。

工作解决方案:

.container {  width: 300px;  background: red;}.row {  display: flex;  flex-direction: row;  flex-wrap: wrap;}.column {    min-width: 0;  flex-basis: 50%;}.column p {  background: gold;  text-overflow: ellipsis;  overflow: hidden;  white-space: nowrap;}<div >  <div >    <div >      <p>Captain's Log, Stardate 9529.1: This is the final cruise of the starship Enterprise under my command. This ship and her history will shortly become the care of another crew. To them and their posterity will we commit our future. They will continue the voyages we have begun and journey to all the undiscovered countries boldly going where no man, where no one has gone before.</p>    </div>    <div >      <p>Captain's Log, Stardate 9529.1: This is the final cruise of the starship Enterprise under my command. This ship and her history will shortly become the care of another crew. To them and their posterity will we commit our future. They will continue the voyages we have begun and journey to all the undiscovered countries boldly going where no man, where no one has gone before.</p>    </div>  </div></div>


转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/647694.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号