特定部分中的HTML和CSS背景图像

时间:2017-08-08 09:39:26

标签: html css background-image

我试图让图片填满我正在制作的网页上的特定部分,但我找不到任何在线工作的内容。



.bigslide {
  display: block;
  position: relative;
  width: 100%;
  /*background: rgb(231, 231, 231);*/
  padding: 160px 0;
  color: #0ed1fb;
  animation: slideleft 2000s infinite linear;
  -webkit-animation: slideleft infinite linear;
}

.bigslide h1 {
  font-size: 34px;
  font-weight: bold;
  margin-bottom: 20px;
}

.bigslide p {
  font-size: 20px;
}

<section id="bigslide">
  <div class="bigslide">
    <div class="container">
      <h1 class="slideup">Tigercraft01's High Quality Setups</h1>
      <p>Scroll down to read about me and what I do.</p>
    </div>
  </div>
</section>
&#13;
&#13;
&#13;

我需要将图片显示在使用提供的代码段加载的文字后面。

1 个答案:

答案 0 :(得分:0)

我不确定为什么它不在您的CSS中,因为您尝试添加图像,但如果您想在您的部分添加背景图像,请使用:

.bigslide {
    background-image: url('http://lorempixel.com/g/500/500/');
    background-repeat: no-repeat;
    background-size: cover;
}