以顯示錶為中心
HTML:
<div class="wrapper">
<div class="outer">
<div class="inner">
centered
</div>
</div>
</div>
CSS:
.wrapper {
height: 600px;
text-align: center;
}
.outer {
display: table;
height: 100%;
width: 100%;
}
.outer .inner {
display: table-cell;
text-align: center;
vertical-align: middle;
}