当我调整浏览器窗口的大小时,滑块从主容器中移出
我正在使用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>
最佳答案
您在许多地方都有固定的宽度,因此不适合移动版式。更改它:在您拥有style="width: ****px"
的每个地方都将其设置为style="width: 100%"
。
我已经尝试过了,看起来还不错:http://jsfiddle.net/48y2Q/1/