我的標題沒有出現在任何地方。我想知道如何解決它。CSS尺寸的百分比
body {
background-color: antiquewhite;
font-size: 100%;
width: 100%;
height: auto;
}
nav {
height: 8%;
width: 100%;
position: fixed;
display: block;
background-color: grey;
z-index: 1000;
}
header {
width: 100%;
background-image: url("https://placehold.it/50/50");
}
<nav>
<h1>...</h1>
</nav>
<header>
</header>
沒有你給我們HTML,我們如何幫助你。提供完整的代碼。 –
它的一切都好,在我身邊,你正確地傳遞圖像路徑'url'嗎? –
'header'沒有高度? – 2016-12-15 15:42:44