我正在使用Cordova开发混合应用程序。我面临的问题是将文本区域的高度设置为50%,这将使我的应用程序在平板电脑,手机等所有设备上均匀外观。我试图谷歌它并尝试所有的东西,但没有找到一个合适的解决方案。有人可以帮助我吗?
<textarea cols="50%">
At w3schools.com you will learn how to make a website. We offer free tutorials in all web development technologies.
</textarea>
我试过这样的事情
答案 0 :(得分:-1)
你需要设置高度,而不是宽度。 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>
&#13;