更改行计数在materialize css文本区域中不起作用

时间:2022-05-02 21:45:56

In materialize css text area, is it possible to initialize the text area with a specific row count using "rows='20'" ? How can we increase the default row count ?

在物化css文本区域中,是否可以使用“rows = '20'”初始化具有特定行数的文本区域?我们如何增加默认行数?

code which doesn't work:

代码不起作用:

<div class="input-field col s12">
   <textarea id="textarea1" class="materialize-textarea" rows="20" ></textarea>
   <label for="textarea1">Text</label>
</div>

1 个解决方案

#1


8  

The default stylesheet is setting a height so you'll have to override that.

默认样式表设置高度,因此您必须覆盖它。

textarea.materialize-textarea{height: 6rem;}

#1


8  

The default stylesheet is setting a height so you'll have to override that.

默认样式表设置高度,因此您必须覆盖它。

textarea.materialize-textarea{height: 6rem;}