我想用背景圖片製作標題並覆蓋頁面。所以這是我的代碼。標題圖片不顯示相對位置時
.header {
background: url('img/bg-01.png') center center;
position: relative;
min-height: 100%;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
<header class="header" id="top">
</header>
<div class="container text-center">
<h3>Lorem Ipsum</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
</div>
我使用CSS引導反正。但是,標題沒有顯示,當我將位置改爲絕對時,標題出現了。但標題後面的內容完全不顯示。如何解決它?
太感謝你了! – Anne
@安妮不客氣 - 當您可以通過按打勾圖標請接受這個答案。 – ProEvilz