我有這兩行代碼在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 –