英文:
Change input field height based on the content inside in Bootstrap
问题
我正在尝试将内容适应到Bootstrap输入字段中,但它甚至没有绑定。请找到需要根据内容大小增加高度的代码行。
<input type="text" autocomplete="off" class="form-control"
name="typeOfOwnership"
[(ngModel)]="newJson?.basicDetails.typeOfOwnership[0].typeOfOwnershipName"
readonly>
英文:
I am trying to fit content inside the bootstrap input field and it is not even binding. Please find the code line in which I need to adjust height as the content size increases.
<input type="text" autocomplete="off" class="form-control"
name="typeOfOwnership"
[(ngModel)]="newJson?.basicDetails.typeOfOwnership[0].typeOfOwnershipName"
readonly>
答案1
得分: 2
当您的内容较多时,应使用文本区域。
尝试使用这个
<textarea [(ngModel)]="newJson?.basicDetails.typeOfOwnership[0].typeOfOwnershipName" readonly></textarea>
英文:
When your content is bigger, you should be using a Textarea instead.
try using this
<textarea [(ngModel)]="newJson?.basicDetails.typeOfOwnership[0].typeOfOwnershipName" readonly></textarea>
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论