【问题标题】:Flexbox in IE10IE10 中的弹性盒
【发布时间】:2014-05-26 17:50:54
【问题描述】:

我正在尝试让弹性框在 IE10 中工作,但它不工作。 Safari、Chrome 和 Firefox 运行良好,但 IE10 无法运行。有人知道答案吗?

codepen:http://codepen.io/anon/pen/vcEGH/

  display: -moz-box;              /* OLD - Firefox 19- (doesn't work very well) */
  display: -ms-flexbox;           /* TWEENER - IE 10 */
  display: -webkit-flex;          /* NEW - Chrome */
  display: flex;                  /* NEW, Spec - Opera 12.1, Firefox 20+ */

  -webkit-box-direction: normal;
  -moz-box-direction: normal;
  -ms-flex-direction: row;
  -webkit-flex-direction: row;
  flex-direction: row;

  -webkit-box-lines: multiple;
  -moz-box-lines: multiple;
  -ms-flex-wrap: wrap;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;

  -webkit-box-pack: justify;
  -moz-box-pack: justify;
  -ms-flex-pack: justify;
  -webkit-justify-content: space-between;
  justify-content: space-between;

【问题讨论】:

  • 你能提供一个codepen或小提琴吗?
  • 另外,请详细说明什么不起作用:它是完全忽略样式,还是只是没有按照您的意愿/期望进行布局?具体一点。
  • caniuse.com : 在 IE10 和 IE11 中,如果容器具有 min-height 但没有明确的 @987654328,则具有 display: flexflex-direction: column 的容器将无法正确计算其弯曲子项的大小@ 财产。 See bug.
  • 我这样做是为了一个博主的布局,但总体思路是这样的:

标签: css internet-explorer-10 flexbox


【解决方案1】:

对于 IE10,span 应该显示为inline-block 以某种方式触发布局。


在这里测试它是否修复它:http://codepen.io/gc-nomade/pen/lhsEt

【讨论】:

  • IE10 没有任何变化
  • @user3071261 好的,所以它与跨度有关,将它们设置为:span{display:inline-block;} 以触发布局
  • IE10 > 还在纠结布局 :)!,不客气。
  • 谢谢,显示:块或内联块+ flex-shrink:1;像魅力一样工作:)
  • 这似乎仍然是这样。知道为什么吗?
猜你喜欢
  • 2013-09-13
  • 2015-09-09
  • 1970-01-01
  • 2016-07-05
  • 1970-01-01
  • 2012-06-02
  • 2018-04-15
  • 2020-08-12
  • 2017-03-16
相关资源
最近更新 更多