How do I make my Bootstrap Carousel the full width of the page?

后端 未结 1 1461
慢半拍i
慢半拍i 2021-01-23 15:45

I am trying to make my bootstrap carousel the full width of the page, thinking that that will look the best. I\'ve looked it up and nothing I tried worked, though. Also, if you

相关标签:
1条回答
  • 2021-01-23 16:05

    Just remove the container like in this fiddle https://jsfiddle.net/zdxq5c85/

    <!-- CAROUSEL START -->
                    <div id="myCarousel" class="carousel slide" data-interval="3000" data-ride="carousel">
                        <!--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"></li>
                            <li data-target="#myCarousel" data-slide-to="2"></li>
                        </ol>
                        <!-- Carousel items -->
                        <div class="carousel-inner">
                            <div class="item active">
                                <img src="http://36646d87786feafc0611-0338bbbce19fc98919c6293def4c5554.r0.cf1.rackcdn.com/images/FiGZ9r3D3E82.878x0.Z-Z96KYq.jpg" alt="First Slide">
                                <div class="carousel-caption">
                                    <h3>First slide label</h3>
                                    <p>BLAH</p>
                                </div>
                            </div>
                            <div class="item">
                                <img src="https://media.licdn.com/mpr/mpr/p/2/005/096/045/19d71d5.jpg" alt="Second Slide">
                                <div class="carousel-caption">
                                    <h3>Second slide label</h3>
                                        <p>BLAH BLAH</p>
                                    </div>
                                </div>
                                <div class="item">
                                    <img src="http://d3psvddqt9zx7g.cloudfront.net/blog/wp-content/uploads/2015/05/lol1-2.jpg" alt="Third Slide">
                                    <div class="carousel-caption">
                                        <h3>Third slide label</h3>
                                        <p>BLAH BLAH BLAH</p>
                                    </div>
                                </div>
                            </div>
                            <!--Carousel nav -->
                            <a class="carousel-control left" href="#myCarousel" data-slide="prev">
                                <span class="glyphicon glyphicon-chevron-left"></span>
                            </a>
                            <a class="carousel-control right" href="#myCarousel" data-slide="next">
                                <span class="glyphicon glyphicon-chevron-right"></span>
                            </a>
                        </div>
    
                    <!--CAROUSEL END -->
    
    0 讨论(0)
提交回复
热议问题