简体   繁体   中英

I want to add an image to the slideshow

I'm using a Bootstrap template, but cannot get the slideshow working properly as demonstrated here - http://getbootstrap.com/2.3.2/examples/carousel.html

My code looks like this:

<div class="item">
    <div class="fill" style="background-image:url('http://placehold.it/1900x1080&text=Slide Two');"></div>
        <div class="carousel-caption">
            <h2></h2>
        </div>
     </div>

I want to add my own image instead of the URL image that is already there.

If you're working locally you can change that URL to wherever you are saving your image. For example, I like to put my images in a folder called "img", so my code might look like this:

<div class="fill" style="background-image:url('img/my-image-here.jpg');"></div>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM