2016-06-07 61 views
1

在离子中,我怎样才能把一个按钮从底部的离子内容的百分比?离子:从底部的位置按钮

我已经试过

<ion-view> 
    <ion-content> 
     <div class="button-bottom"> 
     <button class="button button-block button-energized">Button</button> 
     </div> 
    </ion-content> 
</ion-view> 

CSS:

.button-bottom{ 
position: absolute; 
bottom: 30%; 
} 

但按钮现在不采取全宽。

回答

2

试着给你的容器的显式宽度:

.button-bottom{ 
position: absolute; 
bottom: 30%; 
width: 100%; 
} 
1

添加 “full” 变量在button

例如: - button class="button button-block button-energized" full >Button</button>

更多参考见在UI组件离子文档下面的链接。

Ionic Full Button