OnsenUI ons-bottom-toolbar 对齐
OnsenUI ons-bottom-toolbar align
为什么此代码仅适用于 "ons-toolbar"
<ons-bottom-toolbar>
<div class="left">
<ons-icon icon="ion-android-share-alt"></ons-icon>
</div>
</ons-bottom-toolbar>
没有CSS我如何水平对齐?
您可以使用 ons-row 和 ons-col 进行布局。 https://onsen.io/reference/ons-col.html
例如,如果您希望左侧为 30%,中间为 50%,右侧为 20%,您可以这样做:
<ons-row>
<ons-col width="30%"> Left </ons-col>
<ons-col width="50%"> Middle </ons-col>
<ons-col width="20%"> Right </ons-col>
</ons-row>
为什么此代码仅适用于 "ons-toolbar"
<ons-bottom-toolbar>
<div class="left">
<ons-icon icon="ion-android-share-alt"></ons-icon>
</div>
</ons-bottom-toolbar>
没有CSS我如何水平对齐?
您可以使用 ons-row 和 ons-col 进行布局。 https://onsen.io/reference/ons-col.html
例如,如果您希望左侧为 30%,中间为 50%,右侧为 20%,您可以这样做:
<ons-row>
<ons-col width="30%"> Left </ons-col>
<ons-col width="50%"> Middle </ons-col>
<ons-col width="20%"> Right </ons-col>
</ons-row>