繁体   English   中英

Bootstrap中的文本区域自动高度

[英]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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM