带有twitter bootstrap响应式布局的图像滑块

时间:2015-01-08 16:47:04

标签: html twitter-bootstrap responsive-design

我已经创建了我的网站,有一个Twitter引导响应布局,但我只是添加了一个图像滑块,并且似乎能够缩小屏幕缩小屏幕,就像我尝试过的其他网站一样将它包装在标签中,但它没有任何影响,任何人都可以帮我解决这个问题吗?提前谢谢!

这是我的Image Slider HTML代码:

<div class="container">
    <div class="span12">
        <div id = "Myhero">

            <div id = "pager"></div>
            <div class = "glyphicon glyphicon-pause" id = "pause"></div>
            <div class = "glyphicon glyphicon-play" id = "play"></div>
            <div class = "glyphicon glyphicon-chevron-right" id = "next"></div>
            <div class = "glyphicon glyphicon-chevron-left" id = "prev"></div>

            <div id = "Myslider">

                <div class = "MyMyitems">
                    <img src = "b1.png"></img>

                    <div class = "Myinfo">
                        <h2>Photo/h2>
                            <p>Photo<a href = "#"></a>Link Here</p>

                    </div><!-- end of Myinfo -->
                </div><!-- end of Myitems -->

                <div class = "Myitems">
                    <img src = "b1.png"></img>

                    <div class = "Myinfo">
                        <h2>Photo/h2>
                            <p>Photo<a href = "#"></a>Link Here</p>

                    </div><!-- end of Myinfo -->
                </div><!-- end of Myitems -->

                <div class = "Myitems">
                    <img src = "b1.png"></img>

                    <div class = "Myinfo">
                        <h2>Photo/h2>
                            <p>Photo<a href = "#"></a>Link Here</p>

                    </div><!-- end of Myinfo -->
                </div><!-- end of Myitems -->

                <div class = "Myitems">
                    <img src = "b1.png"></img>

                    <div class = "Myinfo">
                        <h2>Photo/h2>
                            <p>Photo<a href = "#"></a>Link Here</p>

                    </div><!-- end of Myinfo -->
                </div><!-- end of Myitems -->

                <div class = "Myitems">
                    <img src = "b1.png"></img>

                    <div class = "Myinfo">
                        <h2>Photo/h2>
                            <p>Photo<a href = "#"></a>Link Here</p>

                    </div><!-- end of Myinfo -->
                </div><!-- end of Myitems -->

                <div class = "Myitems">
                    <img src = "b1.png"></img>

                    <div class = "Myinfo">
                        <h2>Photo/h2>
                            <p>Photo<a href = "#"></a>Link Here</p>

                    </div><!-- end of Myinfo -->
                </div><!-- end of Myitems -->

            </div><!-- slider id -->

        </div><!-- end of Hero -->
    </div>
</div>

2 个答案:

答案 0 :(得分:1)

您是否添加了twitter bootstrap滑块或其他滑块。你能分享现场网站的网址吗?您可以在此处轻松添加默认引导滑块代码

<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
      <ol class="carousel-indicators">
        <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
        <li data-target="#carousel-example-generic" data-slide-to="1"></li>
        <li data-target="#carousel-example-generic" data-slide-to="2"></li>
      </ol>
      <div class="carousel-inner" role="listbox">
        <div class="item active">
          <img src="photo.jpg" alt="photo">
          <div class="carousel-caption">
            CONTENT
          </div>
        </div>
        <div class="item">
          <img src="photo.jpg" alt="photo">
          <div class="carousel-caption">
                CONTENT
          </div>
        </div>
      </div>
      <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
        <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
        <span class="sr-only">Previous</span>
      </a>
      <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
        <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
        <span class="sr-only">Next</span>
      </a>
</div> 

答案 1 :(得分:0)

对不起,我是一个完全的初学者,我从一个在线示例创建了一个图像滑块。我不知道bootstrap在其主页上有一个图像滑块类和示例。道歉我不是故意浪费任何时间!