html - Flex 在 chrome 中工作,但在 IE 中不工作
问题描述
代码的html结构如下图所示。现在我将 background:red 赋予时间线类名(以检查在最小化和最大化窗口大小时孩子是否缩小或增长)。时间线是集群、事件项、今天、今天的父项。
当我尝试通过重新缩放窗口大小来最小化和最大化时,在 chrome 中它运行良好,但在 IE 中它被破坏了。
我不确定我哪里出错了。似乎时间线不是灵活增长:1。
<div class="data">
<div class="dataselect__main ">
<div class="dataselect__content" >
<div class="logic_scrollbararea">
<div class="timeline">
::before
<div class="data__moredata--buttoncontainer">
<div class="data__moredata--button">
</div>
</div>
<div class="timeline__item__cluster" ></div>
<div class="timeline__item__eventItem" ></div>
<div class="timeline__item__todayItem "></div>
<div class="timeline__item__todaydateItem "></div>
<div class="timeline__nodataavailable" ></div>
::after
</div>
</div>
</div>
</div>
css
.dataselect__main{
height: 100%;
overflow: hidden;
display:flex;
flex:1;
}
.dataselect__content{
overflow: hidden;
position: absolute;
left: 0;
height: 100%;
width: 100%;
display:flex;
flex:1;
min-height:0;
min-width:0;
}
.logic_scrollbararea{
display: inherit;
overflow: hidden;
padding: 0px;
position: absolute;
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
}
}
.timeline {
height: 100%;
padding-top: 3.125rem;
position: absolute;
min-width: 100%;
background:red;
}
.timeline:before {
content: "";
height: 0.375rem;
border-radius: 0.3125rem;
border: 0.125rem solid #1f1f1f;
background-color: #2d6483;
display: block;
top: 3.125rem;
left: 0;
right: 0.25rem;
margin-top: 0.4375rem;
}
.timeline:after {
content: "";
border-radius: 0.5rem;
border: 0.125rem solid #1f1f1f;
background: #389dd5;
top: 3.125rem;
right: 0;
margin-top: 0.25rem;
width: 0.75rem;
height: 0.75rem;
}
解决方案
推荐阅读
- python - 为什么我不能填充我的 tksheet 表格行?
- python - Flask 渲染以前版本的 CSS
- python-3.x - aiomysql 选择数据问题:未更新
- c - 为什么使用c不能在函数外访问函数中的内存空间malloc
- java - Spring boot 没有从 Maven 项目中的 soap wsdl 生成 java 类。这是我的 pom.xml
- windows - 如何在 Rust 中创建一个继承自 C++ 中定义的 COM 对象的 COM 对象?
- javascript - 同级组件不接收发出的更改
- algorithm - 代表顶点循环覆盖
- reactjs - 如何通过 React 动态显示数据列表?
- javascript - Redux Store 向原始选择添加重复内容和导航产生空数组