【发布时间】:2020-01-23 11:20:35
【问题描述】:
代码的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;
}
【问题讨论】:
-
烧掉,即......烧掉它!!!! caniuse.com/#search=flex
-
@ScottChambers 是的。我检查了这个,IE 11 支持 flex。
标签: html css flexbox internet-explorer-11