textarea's rows, and cols attribute in CSS

后端 未结 5 1253
南方客
南方客 2020-12-07 13:37

I\'d like to set the textarea\'s rows and cols attributes via CSS.

How would I do this in CSS?

5条回答
  •  有刺的猬
    2020-12-07 14:20

    
    

    It is equivalent to:

    textarea {
        height: 4em;
        width: 50em;
    }
    

    where 1em is equivalent to the current font size, thus make the text area 50 chars wide. see here.

提交回复
热议问题