Css背景图片不显示

问题描述 投票:0回答:1

我想用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>
html css visual-studio dreamweaver
1个回答
0
投票

这背后的原因是由于你使用的是 no-repeat -400px

当你把不重复的部分去掉后,图片就会成功出现。

像这样。background-image: url("../Take2/assets/bg.jpg")

希望对你有帮助

© www.soinside.com 2019 - 2024. All rights reserved.