1
votes

I want a cover-image on middle and the carousel on bottom, the captions that are in carousel (I want to change with item-background) on top in z-index.

Remind top ->bottom => caption ->cover-image ->item(background)

What should I do?

The class base on bootstrap framework

HTML

<div class="cover-image"></div>
        <div id="myCarousel" class="carousel slide" data-ride="carousel">
            <!-- Indicators -->
            <ol class="carousel-indicators">
                <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
                <li data-target="#myCarousel" data-slide-to="1" class=""></li>
                <li data-target="#myCarousel" data-slide-to="2" class=""></li>
            </ol>
            <div class="carousel-inner" role="listbox">
                <div class="item active bg bg1">
                    <div class="container caption">...(p1)</div>
                </div>
                <div class="item  bg bg2">
                    <div class="container caption">...(p2)</div>
                </div>
                <div class="item  bg bg3">
                    <div class="container caption">...(p3)</div>
                </div>
            </div>
        </div>
1
could you please create one demo?cracker

1 Answers

0
votes

Well, you cold wrap all of these in a div then use position:relative; on div and apply this css for the captions.

.caption
{
  position: absolute;
  top: 0;
}