Moh*_*qui 16 html height textarea row row-height
我想知道一行textarea的高度.我想知道,因为我想做一些计算.我们知道吗或者我们必须做一些脚本吗?
小智 21
行的高度由line-height.设置.
例如:
<textarea rows="1">hello world</textarea>
Run Code Online (Sandbox Code Playgroud)
如果您设置以下内容:
textarea { line-height: 1; font-size: 12px; border: none; margin: 0; padding: 0; }
Run Code Online (Sandbox Code Playgroud)
通过检查textarea元素,您会发现它的高度为12px.