【问题标题】:How do you scale the carousel container size in Angular-UI-Bootstrap如何在 Angular-UI-Bootstrap 中缩放轮播容器大小
【发布时间】:2016-11-10 01:04:25
【问题描述】:

现在轮播容器位于图像之外。

我希望轮播容器与https://angular-ui.github.io/bootstrap/ 上的示例中显示的图像具有相同的宽度。

这是我的html:

<div class="offer-detail-image-div">
  <uib-carousel active="0" interval="2000" no-wrap="false" no-pause="false">
    <uib-slide ng-repeat="slide in slides track by slide.id" index="slide.id">
      <img class="offer-detail-image" ng-src= {{slide.image}}
    </uib-slide>
  </uib-carousel>
</div>

以及随附的课程:

.offer-detail-image {
  display: block;
  overflow: visible;
  width: auto;
  height: auto;
  max-width: 80%;
  min-width: 70%;
  margin-right: auto;
  margin-bottom: 12px;
  margin-left: auto;
  float: none;
}



 .offer-detail-image-div {
    display: block;
    width: 100%;
    padding-right: 20px;
    padding-left: 20px;
   }

【问题讨论】:

    标签: css angularjs html angular-ui-bootstrap


    【解决方案1】:

    像这样更改 css,你必须给出 100% 的宽度,并且在你的 css 中你提到 max-width 80%。

    .offer-detail-image {
          display: block;
          overflow: visible;
          width: 100%;
          height: auto;
          margin-right: auto;
          margin-bottom: 12px;
          margin-left: auto;
          float: none;
        }

    【讨论】:

    • 好女士 cz 我是女士。不需要夫人,我是gayathri。快乐编码@rashadb
    猜你喜欢
    • 2015-01-20
    • 1970-01-01
    • 2015-04-24
    • 1970-01-01
    • 2020-03-12
    • 2013-02-03
    • 1970-01-01
    • 1970-01-01
    • 2020-04-04
    相关资源
    最近更新 更多