我管理的网站有100多页,最近更新为使用Bootstrap-4和Flexbox。问题是,通过Internet Explorer 10+查看时,许多页面都会中断。我们希望在模式中弹出消息,建议用户升级其浏览器,而不是重写代码来定位Internet Explorer。但是,如果用户使用IE查看我们的网站,我只希望显示此消息。由于在IE10中禁用了条件注释,因此它们不是一种选择。我搜索了SO和谷歌寻找答案,但没有运气。
我发现@supports (display: grid) {
对这个问题很有效,并且对于不支持flexbox的旧浏览器有一个后备。