gpt4 book ai didi

css - 如何在 IONIC 2 中放大输入字段

转载 作者:太空宇宙 更新时间:2023-11-03 22:39:54 25 4
gpt4 key购买 nike

我想弄清楚如何扩大输入字段,使其填满标题下方的整个页面。

enter image description here

我想放大“突出显示”部分以覆盖页面的其余部分。


代码如下:

tagebuch.html:

[........]

<ion-content>
<ion-list>

[........]

<ion-item id="description">
<ion-label floating>Description</ion-label>
<ion-input type="text" [(ngModel)]="Eintrag"></ion-input>
</ion-item>

</ion-list>

<button full ion-button class="iButton" (click)="saveEintrag()">Speichern</button>

</ion-content>

tagebuch.scss:

page-tagebuch-anlegen {

#description{
height: 80%;
}
}

我不明白为什么这段代码“什么都不做”,但如果我以“px”为单位指定高度,它就可以工作。

谁能告诉我,为什么这不起作用,我该如何解决?

谢谢你:)

最佳答案

您需要使用文本区域来进行多行处理。

<textarea name="Text1" cols="40" rows="5"></textarea>

关于css - 如何在 IONIC 2 中放大输入字段,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44471429/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com