'Bootstrap.js Carousel with only text

I follow this tutorial to make Carousel slide .

When I define each item contain image and paragraph as -

<div class="item">
    <img src="http://placehold.it/1200x480" alt="" />
    <div class="carousel-caption">
        <p>Caption text here</p>
    </div>
</div> 

it's work fine (here its jsFiddle) .

But when I reduce it to paragraph only as -

<div class="item">
    <div class="carousel-caption">
        <p>Caption text here</p>
    </div>
</div> 

it stop working (here its jsFiddle) .

How could I make it work with only paragraph such that is slide the text each switch ?



Solution 1:[1]

The easiest way will simply to make images that are a background colour. If you want a cleaner way to do it, you can probably achieve the same effect using CSS.

Solution 2:[2]

See after removing image and leaving only paragraph

i gave the item container class the width and height of image with a background colour to div to indicate the presence just copy and paste this code in fiddle css section and run to see the change

.item{
    height:480px;
    width:1200px;
    background-color:orange;
}

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Rahul Dass
Solution 2