【发布时间】:2018-08-17 00:10:46
【问题描述】:
我有一列里面有多个divs。如何将最后一个 div 对齐到列的底部?
示例代码:
<!-- language: lang-html -->
<ion-grid>
<ion-row>
<ion-col>
<div> some text at the top </div>
<div> more text at the top </div>
<div> text at the bottom </div> <!-- I want this to be at the bottom of the column-->
</ion-col>
</ion-row>
</ion-grid>
【问题讨论】:
-
最后一个 div 已经在列的底部,它会自动垂直放置 div。
-
@theriddle2 列后有空格,直到下一行。我希望最后一个 div 与列的底部对齐
-
你的意思是填充吗? ion-col 所有边都有 5px 的填充,如果你的意思是 ion-col { padding: 0px } 会消除它
-
@theriddle2 不,抱歉,我解释得不好。我在离子行中有 2 列。其中一列比这一列长,因此会产生额外的空间。
标签: ionic-framework ionic2 ionic3