html - flex-direction 和 flex 不适用于所有浏览器

标签 html css cross-browser flexbox

<分区>

我已经关注 CSS 类,我想让它适用于以下所有浏览器:

  1. IE 9 及以上
  2. Chrome
  3. 火狐浏览器
  4. Safari

    .itemContainer {
        display: flex;
        flex-direction: row;
    }
    .wrap-vertical {
           flex: 1;
           margin-top: 15px;
    }
    

目前它只适用于 Chrome 和 FF。

我尝试了 IE 和 Safari 的 -ms--webkit- 但它不起作用。

请提出更改建议以适应这一点。

最佳答案

IE 9 支持 flexbox。

IE 10 支持旧的 flexbox 规范并需要 vendor prefixes .

虽然 Safari 9 支持当前没有前缀的 flexbox 规范,但旧版本需要前缀。

有关 flexbox 浏览器支持的完整评论,请参阅此页面: http://caniuse.com/#search=flex

要快速添加您需要的所有前缀,请在此处的左侧面板中发布您的 CSS:Autoprefixer .

关于html - flex-direction 和 flex 不适用于所有浏览器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34985818/

相关文章:

jquery - 棘手的 jQuery DOM 操作(文本换行)

css - ManuMatic 选择的菜单项在选择更新时消失

html - 给表格添加滚动条

javascript - setTimeout 函数在 Firefox 上不起作用

javascript - 在 chrome/firefox 阅读 View 中禁用文本选择

javascript - 与 sibling 一起做两个按钮的互斥复选框()

javascript - 在我的案例中如何禁用拖动功能?

html - 使用没有 ID 的 CSS 删除元素

javascript - 为什么CSS中的display none没有被fadein去掉?

javascript - 自定义选择框(jquery 脚本)- 非 FF div 滚动问题