gpt4 book ai didi

html - Internet Explorer 11 flex 盒问题

转载 作者:技术小花猫 更新时间:2023-10-29 12:00:33 25 4
gpt4 key购买 nike

我编写的代码在我测试过的所有浏览器中都有效,但 IE 11 除外。问题似乎出在这里:

#wrapper {
display: -webkit-flex;
display: -moz-flex;
display: -ms-flexbox;
display: -o-flex;
display: flex;
-webkit-flex-direction: row;
-moz-flex-direction: row;
-ms-flex-direction: row;
-o-flex-direction: row;
flex-direction: row;
-webkit-flex-wrap: wrap;
flex-wrap: wrap;
width: 100%;
height: 100%;
position: relative;
top: 1em;
}

如果我删除 flex,它会变得更易于管理,但有了它们,它会将所有内容缩小到这个狭长的 div 中,并永远持续下去。

如果我在 IE 10 中测试会有帮助吗?

最佳答案

你只需要 flex:1;它将解决 IE11 的问题

#wrapper {
display: -webkit-flex;
display: -moz-flex;
display: -ms-flexbox;
display: -o-flex;
display: flex;
-webkit-flex-direction: row;
-moz-flex-direction: row;
-ms-flex-direction: row;
-o-flex-direction: row;
flex-direction: row;
-webkit-flex-wrap: wrap;
flex-wrap: wrap;
width: 100%;
height: 100%;
position: relative;
top: 1em;
flex:1;
}

关于html - Internet Explorer 11 flex 盒问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42966352/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com