我有这两行代码在Chrome和Firefox中工作,但不在IE11中。带有小数点的计算器在IE11中不起作用?
height: calc((100% - 25px)/2); // this is not working
left: calc(105px/2); // this is working
请给我建议一个解决方案。
.relative-cell{
position: relative;
height: 100%;
}
.downline, .upline{
position: absolute;
height:calc((100% - 25px)/2);
background-color:rgba(0, 0, 0, 0.2);
width: 1px;
left:calc(105px/2);
}
<td class="relative-cell">
<div class="transaction-body transaction-date-section flex-row to-center to-mid">
<div one-svg="long-arrow" class="account-transaction-type transaction-type"></div>
</div>
<div class="downline"></div>
<div class="upline"></div>
</td>
IE的哪个版本
calc()
? 7? 8? 9? 10? 11?企业模式?兼容性视图启用?任何组策略设置或站点列表?我们需要的不仅仅是“它在IE中不起作用”。 – csmckelvey请按建议添加信息,并提供测试示例(例如内联代码片段或JSFiddle)。 –
阅读这个问题,看看不是calc是这里打破的那个,如果不是所有的父母都有100%定义的身高,那么100%的身高不起作用。 http://stackoverflow.com/questions/16811716/height100-not-working-in-internet-explorer –