如何在Angular-UI-Bootstrap

时间:2016-07-01 03:35:40

标签: css angularjs html5 angular-ui-bootstrap

现在,旋转木马容器落在图像之外。

enter image description here

我希望旋转木马容器的宽度与图像的宽度相同,如https://angular-ui.github.io/bootstrap/上的示例所示。

enter image description here

这是我的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;
   }

1 个答案:

答案 0 :(得分:1)

像这样改变css你必须给出100%的宽度,而且在你的css你提到最大宽度80%。

const Comments = props => {
    return (
        <div></div>
    );
}