【发布时间】:2013-06-13 22:24:32
【问题描述】:
根据http://caniuse.com/#feat=flexbox
它应该适用于带有供应商前缀的 IE10。
但事实并非如此!
更新:我刚刚检查了最新的 Firefox,它看起来完全坏了。
为什么?
<div id="wrapper" style="margin:auto;background-color:yellow;height:100%;">
<div style="width:50px;height:100%;">
<div class="fluid-column" style="height:80%;background-color:green;">
<div class="box" style="background-color:#ff99cc;height:25%;">1</div>
<div class="box" style="background-color:#ff33cc;height:50%;">2</div>
<div class="box" style="background-color:#ff66cc;height:25%;">3</div>
</div>
<div class="fix-column" style="height:20%;background-color:violet">
<div class="box" style="background-color:orange;height:50%;">Total</div>
<div class="box" style="background-color:blue;height:50%;">Test</div>
</div>
</div>
</div>
body, html{
width:100%;
height:100%;
margin:0;
padding:0;
}
div{
text-align:center;
}
.box
{
display:-webkit-box;-webkit-box-pack:center;-webkit-box-align:center;
display:-ms-box;-ms-box-pack:center;-ms-box-align:center;
display:-moz-box;-moz-box-pack:center;-moz-box-align:center;
}
【问题讨论】:
-
在 IE10、Chrome 和 Safari 中对我来说看起来是一样的。它应该是什么样子的?您能否添加一个图像模型来说明它应该如何显示,或者您想要实现的布局的详细描述?
-
不应该是
-ms-flex-pack, -ms-flex-align吗? -
@MattCoughlin 在 Chrome 中,文本是垂直对齐的。但不是在 FF 和 IE10 中,并且 -ms-box-align:center 应该在使用 -ms-box-orientation:vertically 时垂直对齐它。我只是忘了复制/粘贴它......但它也不适用。
-
垂直对齐什么?中心?最佳?底部?
-
查看 .box 类的垂直居中。
标签: html css internet-explorer-10 flexbox