浏览器调整大小问题滑出容器

时间:2013-01-02 18:06:28

标签: css twitter-bootstrap

当我重新调整浏览器窗口大小时,滑块会从主容器中移出 我正在使用bootstrap响应css 我看到滑块容器中的额外边距,如果我删除它的确定 但如果我仍然使窗口更小滑块熄灭 如何解决这个问题...

http://jsfiddle.net/48y2Q/embedded/result/ http://jsfiddle.net/48y2Q/

在下面提供我的代码

<div class="container">

                                <div id="da-slider" class="da-slider" style="margin-top: 0px; margin-bottom: 0px; height: 300px; background-position: 2700% 0%;">
                                  <div class="da-slide da-slide-fromright da-slide-current" style="width: 1122px;">
                                    <h2><img src="http://www.defie.co/docs/examples/frontpage_rotate1A.jpg" alt="image01"></h2>
                                    <div class="da-img"><img src="http://www.defie.co/docs/examples/frontpage_rotate1B.jpg" alt="image01"></div>
                                  </div>
                                  <div class="da-slide da-slide-toleft" style="width: 1122px;">
                                    <h2><img src="http://www.defie.co/docs/examples/frontpage_rotate2A.jpg" alt="image01"></h2>
                                    <div class="da-img"><img src="http://www.defie.co/docs/examples/frontpage_rotate2B.jpg" alt="image01"></div>
                                  </div>
                                  <div class="da-slide da-slide-toleft" style="width: 1122px;">
                                    <h2><img src="http://www.defie.co/docs/examples/frontpage_rotate3A.jpg" alt="image01"></h2>
                                    <div class="da-img"><img src="http://www.defie.co/docs/examples/frontpage_rotate3B.jpg" alt="image01"></div>
                                  </div>
                                  <nav class="da-arrows" style="width: 1122px;">
                                    <span class="da-arrows-prev"></span>
                                    <span class="da-arrows-next"></span>
                                  </nav>
                                <nav class="da-dots"><span class="da-dots-current"></span><span class=""></span><span class=""></span></nav></div>
                                  </div>

2 个答案:

答案 0 :(得分:0)

答案 1 :(得分:0)

您在许多地方都有固定的宽度,因此它不适合移动布局。更改它:您拥有style="width: ****px"的每个地方style="width: 100%"

我试过了,看起来很不错:http://jsfiddle.net/48y2Q/1/