【发布时间】:2016-10-16 12:58:24
【问题描述】:
我是 Angular Material Design (https://material.angularjs.org/latest/) 的新手,在使加载栏 div在 Internet Explorer 中 水平和垂直居中时遇到了一些问题(在 Chrome/FF 中运行良好)。
我已经仔细阅读了已知的 flexbox 问题,但似乎无法确定这个问题的解决方法。
JSFiddle:https://jsfiddle.net/aanders50/suunyz3e/223/
HTML
<main ng-app="sandbox" flex layout="column" class="col-xs-12" id="view">
<md-content class="loader" layout="row" layout-align="center center" flex>
<div id="title" flex>
<span>Loading...</span>
</div>
<div class="progress" flex>
<div flex class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%">
</div>
</div>
</md-content>
</main>
CSS
#view {
height: 100%;
width: 100%;
}
.progress {
max-width: 260px;
}
#title {
position: absolute;
top: 50%;
left: 0;
right: 0;
color: black;
text-align: center;
font-family: "lato", sans-serif;
font-weight: 300;
font-size: 40px;
letter-spacing: 10px;
margin-top: -72px;
padding-left: 10px;
}
我的目标是仅使用材料设计元素来完成大部分(如果不是全部)布局 - 如果您发现我使用错误,请随时指出!谢谢!
【问题讨论】:
标签: html css angularjs material-design angular-material