无论屏幕宽度如何,引导程序轮播图像都堆叠在一起;

时间:2017-07-04 16:05:54

标签: html css twitter-bootstrap bootstrap-4

我正在尝试制作一个自动转盘,它可以按照给定的顺序在图像之间自动切换。一切都在控制(即在图片和滑动位置指示器之间来回移动的箭头),但是当我加载页面时,图像堆叠在一起。有人能指出这个问题吗?

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Appraisal</title>
    <link rel="stylesheet" href="style.css">
    <link href="https://fonts.googleapis.com/css?family=VT323" rel="stylesheet">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/mdbootstrap/4.3.2/css/mdb.min.css">
  </head>

  <body>
    <header>
      <h1 class="animated slideInLeft">text goes here</h1>
      <p>...</p>
      <h4 class="animated slideInRight">portfolio</h4>
    </header>

    <div id="myCarousel" class="carousel slide">
      <ol class="carousel-indicators">
        <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
        <li data-target="#myCarousel" data-slide-to="1"></li>
        <li data-target="#myCarousel" data-slide-to="2"></li>
      </ol>

      <div class="carousel_inner">

        <div class="item active">
          <img src="./pics/space_1.jpg" alt="Space 1" class="img-responsive">
          <div class="carousel-caption">
            <h3>Appraisal 1</h3>
            <p></p>
          </div>
        </div>

        <div class="item">
          <img src="./pics/space_2.jpg" alt="Space 2" class="img-responsive">
          <div class="carousel-caption">
            <h3>Appraisal 2</h3>
            <p></p>
          </div>
        </div>

        <div class="item">
          <img src="./pics/space_3.jpg" alt="Space 2" class="img-responsive">
          <div class="carousel-caption">
            <h3>Appraisal 3</h3>
            <p></p>
          </div>
        </div>

      </div>

      <a href="#myCarousel" class="carousel-control" data-slide="prev">
        <span class="icon-prev left"></span>
      </a>
      <a href="#myCarousel" class="carousel-control" data-slide="next">
        <span class="icon-next right"></span>
      </a>
    </div>

    <div class="skills">

    </div>

    <div class="certs">


    </div>

    <footer>
      <p>developed by: jefferson steelflex</p>

    </footer>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/mdbootstrap/4.3.2/js/mdb.min.js"></script>
  </body>
</html>

1 个答案:

答案 0 :(得分:1)

这只是一个错字。只需更改课程&#34; carousel_inner&#34;在幻灯片容器div中为&#34; carousel-inner&#34;。