我做了一個小的演示給你按要求,
Plunker
位指示
$scope.items = [{
name1: "Product 1",
img1: "https://placehold.it/100x100",
content1: "Awesome",
name2: "Product 2",
img2: "https://placehold.it/100x100",
content2: "cool",
}, {
name1: "Product 3",
img1: "https://placehold.it/100x100",
content1: "Fantstic",
name2: "Product 4",
img2: "https://placehold.it/100x100",
content2: "Not bad",
}, {
name1: "Product 5",
img1: "https://placehold.it/100x100",
content1: "Good",
name2: "Product 6",
img2: "https://placehold.it/100x100",
content2: "best",
}]
HTML
<div class="row" ng-repeat="item in items" style="margin:5px auto">
<div class="col col-50">
<div class="div-img-device">
<img class="img-device" ng-src="{{item.img1}}"> {{item.name1}}
<br>{{item.content1}}
</div>
</div>
<div class="col col-50">
<div class="div-img-device">
<img class="img-device" ng-src="{{item.img2}}"> {{item.name2}}
<br>{{item.content2}}
</div>
</div>
</div>
CSS
.div-img-device {
background-color: #4F8CA5;
margin: 0;
autoborder: 1px solid black;
border-radius: 4px;
text-align: center;
color: white;
}
.img-device {
width: 100%;
padding-left: 20px;
padding-right: 20px;
padding-top: 20px;
}
如果您需要更多features.Please讓我知道
感謝ansering ..但我需要的,如果沒有爲六個對象,然後它開始的,而不是垂直的。那水平滾動爲什麼我用離子幻燈片 – user944513
我需要顯示一個頁面。而如果四盒有超過四頁然後水平滾動 – user944513
你可以顯示你的對象數組嗎? – Muhsin