How does one set the height of a textarea row in CSS?

两盒软妹~` 提交于 2019-12-13 07:46:13

问题


I want to alter the height of a single row in a textarea. So I'm looking for something like row-height:20px; If that exists that would be great. As I'm guessing that it does not, what do I do? Thanks in advance.

I want a textarea that is a single row but that has a height of 20 px. I cannot use the css height function to set this.


回答1:


You want line-height:

textarea { line-height: 2em; }


来源:https://stackoverflow.com/questions/13544411/how-does-one-set-the-height-of-a-textarea-row-in-css

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!