textarea's rows, and cols attribute in CSS

后端 未结 5 1285
南方客
南方客 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 13:55

    I don't think you can. I always go with height and width.

    textarea{
    width:400px;
    height:100px;
    }
    

    the nice thing about doing it the CSS way is that you can completely style it up. Now you can add things like:

    textarea{
    width:400px;
    height:100px;
    border:1px solid #000000;
    background-color:#CCCCCC;
    }
    

提交回复
热议问题