我想用Dreamweaver和Visual Studio做一个网站,问题是当我在CSS中使用background或backgrouand-image时,图片没有出现。
下面是代码。
CSS展示
.showcase{
min-height: 400px;
background-image:url("../Take2/assets/bg.jpg") no-repeat -400px;
text-align: center;
color: aqua;
}
Html:
<section class="showcase">
<div class="container-fluid">
<h1>Rent a <span>Ring Roamer</span></h1>
<p>Tired of the same old photo booth?<br>
Let our Ring Roamer, Roamer attendant come to you on the Dance Floor or at their tables!<br>
Our Ring Roamer will capture photos of your guests, photos get shared via social media.<br>
The Ring Roamer is awesome because it is on the GO!<br>
The Ring Roamer Selfie Booth has many fun features including Boomerang videos, animated GIFs, and virtual filters.<br>
Your guests will be able to share their experience instantly.</p>
</div>
</section>
这背后的原因是由于你使用的是 no-repeat -400px
当你把不重复的部分去掉后,图片就会成功出现。
像这样。background-image: url("../Take2/assets/bg.jpg")
希望对你有帮助