简体   繁体   English

具有Twitter Bootstrap响应式布局的图像滑块

[英]Image slider with twitter bootstrap responsive layout

I've created my site to have a twitter bootstrap responsive layout but i just added a image slider and cant seem to be able to get it shrink to when you narrow the screen like the rest of my site i have tried to wrap it in tag but it does not have any effect can anyone help me out with this? 我已经创建了一个具有Twitter Bootstrap响应式布局的网站,但我只是添加了一个图像滑块,当像我的网站的其余部分一样缩小屏幕时,似乎无法将其缩小到我尝试将其包装在标签中但这没有任何效果可以帮助我吗? Thanks in advance! 提前致谢!

Here's my Image Slider HTML code: 这是我的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>

Did you added twitter bootstrap slider or another. 您是否添加了twitter bootstrap滑块或其他。 can you share live site url ? 您可以共享实时网站网址吗? You can easily added default bootstrap slider here is code 您可以轻松添加默认的引导程序滑块,这里是代码

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

Sorry I am a complete beginner I created a image slider from an example online. 抱歉,我是一个完整的初学者,我从在线示例创建了图像滑块。 Unknown to me bootstrap has a image slider class and example on its homepage. 我不知道,bootstrap在其主页上具有图像滑块类和示例。 Apologies I did not mean to waste anyone time! 抱歉,我不是要浪费任何时间!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM