【问题标题】:making a image slider using twitter bootstrap carousel使用 twitter 引导轮播制作图像滑块
【发布时间】:2013-08-13 18:36:03
【问题描述】:

所以我在这里尝试使用 twitter bootstrap carousel 制作图像滑块,问题是,下一个,上一个,标题不完全是它应该的样子,这是屏幕截图:

注意上一个和下一个图标在左上角和右上角,而它应该在中间,顺便说一下,这里是代码:

<div id="myCarousel" class="carousel slide">
                    <!-- Carousel slides -->
                    <div class="carousel-inner" width="100%" height="100%">
                        <div class="active item">
                            <img alt="" src="http://www.trexglobal.com/property-management/wp-content/uploads/2010/02/real-estate-investment-property-canada.jpg"
                                style="width: 750px; height: 300px;" />
                            <div class="carousel-caption">
                                <h4>
                                    CAPTION</h4>
                                <p>
                                    Sample Caption</p>
                            </div>
                        </div>
                        <div class="item">
                            <img alt="" src="http://news.worldwidepropertydevelopments.com/wp-content/uploads/2008/09/feature.jpg"
                                style="width: 750px; height: 300px;" />
                        </div>
                        <div class="item">
                            <img alt="" src="http://images.realestate.com/re/homepage/theme4/2.jpg" style="width: 750px;
                                height: 300px;" />
                        </div>
                    </div>
                    <!-- Carousel navigation -->
                    <a class="carousel-control left" href="#myCarousel" data-slide="prev">‹</a> <a class="carousel-control right"
                        href="#myCarousel" data-slide="next">›</a>
                </div>

我在这里做错了什么?有什么建议吗?谢谢。

哦,顺便说一句,如果有帮助,我使用了 bootstrap v3。

【问题讨论】:

    标签: twitter-bootstrap carousel


    【解决方案1】:

    找到了解决办法!

    只需确保职位在carousel-control 之前(即:leftright)在前

    正确答案: class="left carousel-control"

    不太正确的答案: class="carousel-control left"

    我还将导航代码编辑为:

    <a class="left carousel-control" href="#carousel-generic" data-slide="prev"><span
       class="icon-prev"></span></a><a class="right carousel-control" href="#carousel-generic"
         data-slide="next"><span class="icon-next"></span></a>
    

    干杯!

    【讨论】:

      猜你喜欢
      • 2018-03-29
      • 2015-04-16
      • 2018-01-22
      • 2013-04-01
      • 1970-01-01
      • 2020-03-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多