是可能显示:inline-flex在IE 9吗? [英] is it possible display: inline-flex in IE 9?

查看:138
本文介绍了是可能显示:inline-flex在IE 9吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可以解决显示问题:IE 9中的inline-flex

is it possible to Workaround for display:inline-flex in IE 9

<div style="display:inline-flex"> Test </div>


推荐答案

我从您的问题了解,事实上IE9 不支持flexbox

flexbox的polyfill,命名为 flexie.js ,确实存在(不是维护afaik),但它使用flexbox的 old 2009语法

I understand from your question, that you are aware of the fact that IE9 does not support flexbox.
A polyfill for flexbox, named flexie.js, does exist (not maintained afaik), but it works using the old 2009 syntax of flexbox.

当然不建议使用旧的语法,因为2009年的语法确实过时,许多浏览器不再能识别它。 ,您可以尝试使用 Autoprefixer ,将新语法规则转换为旧语法规则(同时为支持它的浏览器保留新语法)。

Using the old syntax is of course not recommended, since the 2009 syntax is really outdated and many browsers won't recognize it anymore. But, you can try to use Autoprefixer, which transforms new-syntax rules to old-syntax rules (while preserving the new-syntax for browsers that do support it).

有一些注意事项 - 你不能使用内联样式,你必须在CSS文件中写你的样式,我不认为它支持对DOM的动态更改。

There are caveats - You won't be able to use inline-style, you would have to write your styles in CSS files, and I don't think it supports dynamic changes to the DOM.

免责声明:我没有尝试过这种方法IE9 + flexie。

Disclaimer: I haven't tried that method with IE9 + flexie.

这篇关于是可能显示:inline-flex在IE 9吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆