skip to Main Content

I have a desire to craft a picture slideshow for my website. With the intention of showcasing them in a slideshow format, I’ve embedded linked images. Regrettably, the functionality isn’t performing as anticipated.
appreciate your support as soon as possible

<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
  <ol class="carousel-indicators">
    <li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
    <li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
    <li data-target="#carouselExampleIndicators" data-slide-to="2"></li>
  </ol>
  <div class="carousel-inner">
    <div class="carousel-item active">
      <img class="d-block w-100" src="1.pgn" alt="First slide">
    </div>
    <div class="carousel-item">
      <img class="d-block w-100" src="2.pgn" alt="Second slide">
    </div>
    <div class="carousel-item">
      <img class="d-block w-100" src="3.pgn" alt="Third slide">
    </div>
  </div>
  <a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">
    <span class="carousel-control-prev-icon" aria-hidden="true"></span>
    <span class="sr-only">Previous</span>
  </a>
  <a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next">
    <span class="carousel-control-next-icon" aria-hidden="true"></span>
    <span class="sr-only">Next</span>
  </a>
</div>

I have tried to put all images in one directory

<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
  <ol class="carousel-indicators">
    <li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
    <li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
    <li data-target="#carouselExampleIndicators" data-slide-to="2"></li>
  </ol>
  <div class="carousel-inner">
    <div class="carousel-item active">
      <img class="d-block w-100" src="1.pgn" alt="First slide">
    </div>
    <div class="carousel-item">
      <img class="d-block w-100" src="2.pgn" alt="Second slide">
    </div>
    <div class="carousel-item">
      <img class="d-block w-100" src="3.pgn" alt="Third slide">
    </div>
  </div>
  <a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">
    <span class="carousel-control-prev-icon" aria-hidden="true"></span>
    <span class="sr-only">Previous</span>
  </a>
  <a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next">
    <span class="carousel-control-next-icon" aria-hidden="true"></span>
    <span class="sr-only">Next</span>
  </a>
</div>

2

Answers


  1. Upon reviewing your code, I’ve identified that the image formats are incorrect. Aside from this issue, everything else appears to be in order. Please modify all picture extensions to PNG.

    <div class="carousel-inner">
        <div class="carousel-item active">
          <img class="d-block w-100" src="1.png" alt="First slide">
        </div>
        <div class="carousel-item">
          <img class="d-block w-100" src="2.png" alt="Second slide">
        </div>
        <div class="carousel-item">
          <img class="d-block w-100" src="3.png" alt="Third slide">
        </div>
    
    Login or Signup to reply.
  2. <!DOCTYPE html>
    <html>
    <head>
      <title>Image Carousel</title>
      <!-- Include Bootstrap CSS -->
      <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
    </head>
    <body>
    
    <div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
      <ol class="carousel-indicators">
        <li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
        <li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
        <li data-target="#carouselExampleIndicators" data-slide-to="2"></li>
      </ol>
      <div class="carousel-inner">
        <div class="carousel-item active">
          <img class="d-block w-100" src="1.png" alt="First slide">
        </div>
        <div class="carousel-item">
          <img class="d-block w-100" src="2.png" alt="Second slide">
        </div>
        <div class="carousel-item">
          <img class="d-block w-100" src="3.png" alt="Third slide">
        </div>
      </div>
      <a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">
        <span class="carousel-control-prev-icon" aria-hidden="true"></span>
        <span class="sr-only">Previous</span>
      </a>
      <a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next">
        <span class="carousel-control-next-icon" aria-hidden="true"></span>
        <span class="sr-only">Next</span>
      </a>
    </div>
    
    <!-- Inc`enter code here`lude Bootstrap JS and jQuery -->
    <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
    
    </body>
    </html>
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search