我發現了一些解釋,在一些下面,但沒有幫助。垂直中心內容在一個高度div
Vertically Align Text Vertically Align
我必須建立在框架結構一個網站。經過一些關於爲我的主頁獲取全屏圖像的研究後,我想出了以下代碼,現在需要將該vh高度俯仰的內容水平和垂直居中。任何人都可以幫忙嗎?這裏是我的screengrab:http://prntscr.com/g7bz5h
,代碼:
.fullwidth-header {
background-image: url(../images/Risk-Home.jpg);
background-repeat: no-repeat;
background-position: center center;
background-size: cover !important;
height: 85vh;
}
.fullwidth-header .overlay {
background-image: url(../images/overlay.png);
background-repeat: repeat;
height: 85vh;
}
.full-head-content {
padding: 50px 0;
vertical-align: middle;
width: 100%;
display: inline-block;
height: 50%;
position: absolute;
top: 50%;
bottom: 0%;
margin: auto;
}
<div class="sixteen columns fullwidth-header">
<div class="overlay">
<div class="container">
<div class="full-head-content center center">
ACCESS TO PROFESSIONAL<br /><br /> Bankers
<br /> Risk Management Specialists<br /> Financial Managers
</div>
</div>
</div>
</div>
@ G-CYR工程就像一個魅力! –