我有以下CSS主要包裝DIV屬性:如何讓一個div背景可見無需添加文本
div#mainWrapper {
margin: auto;
width:70em;
height:100%;
background: url(../images/header.jpg) no-repeat center center fixed;
background-size: cover;
}
我想使整個DIV和它的brackground是可見的,即使在div本身是空的。
如果可能,我不想使用position:fixed
或position:absolute
。
你確定你的網址是正確的嗎? –
你能添加更多的代碼嗎?我想看到父母的div屬性。 – WooCaSh