【发布时间】:2020-09-27 17:23:18
【问题描述】:
在下面的代码中,使用 Internet Explorer 11 时,段落不会被包裹在小屏幕上。通过搜索解决方案,我发现如果在 .fix div 上应用 flex-basis:100% 或 width:100%,则段落会被包裹,但这种方法破坏了我的布局。可能的解决方案是什么
- 保持我的布局不变
- 段落将被包裹在小屏幕上
Internet Explorer 11 的输出:
.container-1 {
display: flex;
justify-content: flex-end;
border: 1px solid red;
}
.container-2 {
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-start;
border: 1px solid blue;
}
<div class='container-1'>
<div class='fix'>
<div class='container-2'>
<p>Center Aligned Content</p>
<p>Some content goes here. Some content goes here. Some content goes here. </p>
</div>
</div>
</div>
【问题讨论】:
标签: css internet-explorer flexbox