【发布时间】:2016-10-31 13:39:09
【问题描述】:
我很好奇是否有人有解决这个问题的方法,其他帖子中没有提到。我已经尝试了其他帖子中提到的所有 UP 投票解决方案,但我的问题仍然存在。
具体来说,“示例”代码和“Stock”引导轮播似乎会为图像添加边距,从而使它们小于容器,并且不与页面上的其他容器对齐。
这是推荐的有效代码 - 但有我似乎无法“轻松”删除的边距。
<div class="container" style="margin-top:40px" >
<div class="row" >
<div class="col-sm-12" >
<div id="carousel-msa" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
... carousel code...
我可以使用额外的“样式”参数强制它,但这会使图像无响应 - 我需要它响应。
<div id="carousel-msa" class="carousel slide" data-ride="carousel" style="margin-left:-15px; width:1200px">
如果您查看 JS Fiddle,您会看到图像被水平压缩,并且与其他元素不对齐。
https://jsfiddle.net/Le16u319/1/
到目前为止我看过的帖子 - 但谁的解决方案不能解决我的问题是:
Bootstrap Carousel image doesn't align properly
Twitter Bootstrap: Have carousel images full width and height
Bootstrap Carousel image doesn't align properly
非常感谢任何帮助。
【问题讨论】:
标签: css image twitter-bootstrap-3 carousel