Folder and image address with carousel bootstrap

-2

How do I modify this DIV to accept a folder and image name?

**<div class="fill" style="background-image:url('http://placehold.it/1900x1080&text=Slide Three');"></div>**

I switch to 'folder / filename.jpg' and it does not load the image.

Look at part of the code that I'm trying to read the images. They are in a folder called on the same level as the index.htm file called fCapa, and all images are automatically renamed to have a sequence, so (1) .jpg, (2) .jpg, and so on, but. ... do not load on screen. '

      <!-- Wrapper for Slides -->
<div class="carousel-inner">
    <div class="item active">
            <div class="fill" style="background-image:url('fCapa/(1).jpg');">
        </div>  
            <div class="carousel-caption"><h2>Caption 1</h2>
            </div>
            </div>

            <div class="item">
                <div class="fill" style="background-image:url('fCapa/(2).jpg');">
        </div>
                    <div class="carousel-caption"><h2>Caption 2</h2>
                    </div>
            </div>

    <div class="item">
        <div class="fill" style="background-image:url('fCapa/(3).jpg');">
            </div>
            <div class="carousel-caption"><h2>Caption 3</h2>
            </div>
            </div>
</div>

<!-- Controls -->
    
asked by anonymous 12.11.2015 / 02:16

1 answer

0

If you're going to make a Carousel , you can not call the image in div through CSS , try doing this:

<div class="carousel-inner" role="listbox">
  <div class="item active">
    <img src="fCapa/(1).jpg" alt="Imagem 1">
    <div class="carousel-caption">
      <!--Aqui vai a descrição da imagem-->
    </div>
  </div>
  <div class="item">
    <img src="fCapa/(2).jpg" alt="Imagem 2">
    <div class="carousel-caption">
      <!--Aqui vai a descrição da imagem-->
    </div>
  </div>
</div>

I think you have the control part of Carousel , if you do not, follow the reference link: Bootstrap Carousel

    
08.12.2015 / 12:21