[英]Text Area Auto Height in Bootstrap
我正在使用Cordova開發混合應用程序。 我面臨的問題是將文本區域的高度設置為50%,這會使我的應用在平板電腦,手機等所有設備上具有統一的外觀。我嘗試通過Google搜索並嘗試所有方法,但沒有找到合適的解決方案。 有人可以幫幫我嗎 ?
<textarea cols="50%">
At w3schools.com you will learn how to make a website. We offer free tutorials in all web development technologies.
</textarea>
我嘗試過這樣的事情
那么您需要設置高度,而不是寬度。 cols
設置寬度,屬性rows
設置高度。
使用此代碼將height
設置為視口的50%
。
<textarea rows="50%">
At w3schools.com you will learn how to make a website. We offer free tutorials in all web development technologies.
</textarea>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/> <textarea rows="50%"> At w3schools.com you will learn how to make a website. We offer free tutorials in all web development technologies. </textarea>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.