我正在开发一个网页,其中没有显示div的背景,只显示空白屏幕,但当我使用<img src="IMG/Banner.jpg"/>
标记而不是background:Url(IMG/Banner.jpg);
图像正在显示时。
请帮我解释为什么背景图片不起作用。
请查看我的div代码
.download-area {
background:url("IMG/secondary-banner.jpg") repeat scroll top center;
padding-bottom: 200px;
padding-top: 78px;
position: relative;
}
.download-area .section-title {margin-bottom: 42px}
.download-area .section-title > h1 {margin-bottom: 22px;}
.download-area .section-title p {
color: #fff;
font-size: 1.5em;
}
.download-buttons .button, .download-buttons .button:hover {
background: #ffffff none repeat scroll 0 0;
border-color: #009fdd;
color: #009fdd;
margin: 0 15px;
padding: 0 28px 0 54px;
position: relative;
background-color: #009FDD;
color: white;
}
.download-buttons .button img {
left: 26px;
position: absolute;
top: 10px;
transition: all 0.3s ease-in 0s
}
.download-buttons .button img.btn-hover {
display: none
}
.download-buttons .button:hover img.btn-hover {
display: block
}
.download-buttons .button:hover {
background: rgba(0, 0, 0, 0) none repeat scroll 0 0;
border-color: #ffffff;
color: #ffffff;
}
&#13;
<div class="download-area" id="pricing">
<img src="IMG/secondary-banner.jpg">
<div class="container">
<div class="row">
<div class="col-md-12 text-center">
<div class="section-title">
<h1>Get <span>Started</span></h1>
<img src="IMG/title-bg-white.png" alt="">
<p></p>
<p class="text-white">First 100 minutes of Video processing on us!</p>
</div>
</div>
<div class="col-md-12">
<div class="download-buttons text-center">
<a href="#" class="button">UPLOAD YOUR FIRST VIDEO</a>
</div>
</div>
</div>
</div>
</div>
&#13;
答案 0 :(得分:0)