我试图将一个消息输入框与页面底部对齐,但似乎无法使其工作。我尝试使用align-self-end并为ion-footer创建一个css类。第一个
ghhaqwfi1#
<ion-footer>不应该进入<ion-content>内部html文件的结构应该是
<ion-footer>
<ion-content>
<ion-header> </ion-header> <ion-content> </ion-content> <ion-footer> </ion-footer>
如果你想在内容的底部显示另一个元素,你可以插入这样的文本区域。不要把图标行放在图标工具栏内。
<ion-content> </ion-content> <ion-footer> <ion-toolbar> <ion-textarea maxRows="4" [(ngModel)]="message" placeholder="Write a message"></ion-textarea> <ion-icon name="paper-plane" slot="end"></ion-icon> </ion-toolbar> </ion-footer>
esyap4oy2#
另一种方法是
.support{ margin: auto; position: absolute; text-align: center; bottom: 20px; width: 100%; } <ion-content padding> ... other elements <div class="support"> <p>some text</p> </div> </ion-content>
2条答案
按热度按时间ghhaqwfi1#
<ion-footer>
不应该进入<ion-content>
内部html文件的结构应该是
如果你想在内容的底部显示另一个元素,你可以插入这样的文本区域。不要把图标行放在图标工具栏内。
esyap4oy2#
另一种方法是