【发布时间】:2016-06-08 00:39:08
【问题描述】:
我使用 z-index 将三张卡片相互对齐。我正在尝试找到一种方法,我可以使用 ng -Repeat 来复制卡片,所以它看起来像这样
第一秒 堆栈堆栈 3 张卡片 3 张卡片
#edit_card{
position: absolute;
z-index:-150;
width:340px;
height:450px;
background-color:ghostwhite;
}
#learn_more
{
position: absolute;
z-index:-100;
width:340px;
height:450px;
background-color:ghostwhite;
}
#main_card
{
position:absolute;
z-index:50;
width:340px;
height:450px;
background-color:ghostwhite;
}
<div class="md-padding" layout="row" layout-wrap >
<md-card id="edit_card" >
<md-card-content ng-class="" style="width:100%;height:100%">
<img src="" width="45px" height="45px" class="md-card-image" alt="image caption">
<div class="edit_block" layout="row" layout-align="center" style="width:100%;height:30%;margin-bottom:2.75%;">
<md-button></md-button>
</div>
<img src="" width="45px" height="45px" class="md-card-image" alt="image caption">
<div class="edit_block" layout="row" layout-align="center" style="width:100%;height:30%;margin-bottom:2.75%;">
<md-button>Edit Application</md-button>
</div>
<img src="" width="45px" height="45px" class="md-card-image" alt="image caption">
<div class="edit_block" layout="row" layout-align="center" style="width:100%;height:30%;margin-bottom:2.75%;">
<md-button>Learn More</md-button>
</div>
</md-card-content>
</md-card>
<md-card id="learn_more" >
<md-card-content ng-class="" style="width:100%;height:100%">
Learn More Card
</md-card-content>
</md-card>
<md-card id="main_card" >
<md-card-content ng-class="" style="width:100%;height:100%">
<button ng-click="changeZ()">Change Z</button>
</md-card-content>
</md-card>
</div>
如果有人对我如何在这里使用 ng-Repeat 有任何想法,将不胜感激。
【问题讨论】:
-
您将如何使用 ng-repeat 取决于您的控制器、您希望在卡片中显示哪些数据以及如何访问这些数据。
标签: javascript html css angularjs