CSS max-height在IE11中不起作用

时间:2022-08-24 08:02:17

This part of CSS works in all modern browsers except IE 11... even IE 9 works. Any workarounds? I am not looking for a JavaScript fix

这部分CSS适用于除IE 11以外的所有现代浏览器......甚至IE 9都可以使用。有任何变通方法吗?我不是在寻找JavaScript修复程序

less

.div{
    max-height: calc(~'100% - 36px');
    overflow-y: auto;
    overflow-x: hidden;
}

compiled css

编译css

.div{max-height:calc(100% - 2.5em);overflow-x:hidden;overflow-y:auto;}

1 个解决方案

#1


-1  

try this

尝试这个

.div{
max-height: calc('100% - 36px') !important;
overflow-y: auto;
overflow-x: hidden;
  }

#1


-1  

try this

尝试这个

.div{
max-height: calc('100% - 36px') !important;
overflow-y: auto;
overflow-x: hidden;
  }