如何用div实现textarea

CSS代码:

.text-box{
        width:400px;
        min-height:120px;
        max-height:300px;
        _height:120px;
        padding:5px;
        outline:0;
        border:1px solid lightgray;
        font-size:12px;
        word-wrap:break-word;
        overflow-x:hidden;
        overflow-y:auto;
        _overflow-y:visible;
}

HTML代码:

<div class="test-box" contenteditable="true"><br></div>

效果图:

posted on 2017-06-14 15:27  人生如逆旅我亦是行人  阅读(610)  评论(0编辑  收藏  举报