[英]Angular-carousel is not showing / not working
When I use the angular-carousel directives, the content is not showing: 当我使用angular-carousel指令时,内容未显示:
<ul rn-carousel rn-carousel-controls rn-carousel-index="carouselIndex" rn-carousel-buffered >
<li ng-repeat="slide in slides track by slide.id" >
<div class="text-center main-hiw-description">
<img class="img-circle img-hiw" src="{{slide.image}}" alt="logo" />
<h4>{{slide.title}}</h4>
<p>
{{slide.description}}
</p>
</div>
</li>
</ul>
To display the content you have to add a ccs height and width: 要显示内容,您必须添加ccs的高度和宽度:
ul {
height:300px;
width: 600px;
background:blue;
}
Most of the examples contain that css rule at the begging: 大多数示例在开始时都包含css规则:
Or you can add a ccs rule to adjust the height to the content( personally I recommend this option ): 或者,您可以添加ccs规则来调整内容的高度( 我个人建议使用此选项 ):
ul[rn-carousel] {
> li {
position: relative;
margin-left: -100%;
&:first-child {
margin-left: 0;
}
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.