1

所以在这里我正在尝试使用 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">‹&lt;/a> <a class="carousel-control right"
                        href="#myCarousel" data-slide="next">›&lt;/a>
                </div>

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

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

4

1 回答 1

0

Found the solution!

Just make sure the position comes first (i.e.: left or right) before carousel-control

right answer: class="left carousel-control"

not-so-right answer: class="carousel-control left"

also i edited the navigation code into:

<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>

cheers!

于 2013-08-07T03:42:57.153 回答