我是新來角材料設計(https://material.angularjs.org/latest/),並有一些麻煩的加載條div
將Internet Explorer的內水平和垂直方向中心(在Chrome/FF工作正常)。中心中心在Internet Explorer對齊偏移
我已經詳細瞭解了已知的柔性盒問題,並且似乎無法找到此問題的解決方法。
的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中,第二個佈局是鍵入'collumn'(花了我一分鐘才明白爲什麼它沒有正確對齊)haha – Austin
對不起:D我的壞。使用'layout-fill'也很好用:[link](https://jsfiddle.net/aanders50/suunyz3e/223/)。您不需要設置佈局並對其進行彎曲,並用此設置100%的高度和寬度。 – pavelccz
這是正確的[jsfiddle](https://jsfiddle.net/suunyz3e/224/) – pavelccz