관리 메뉴

팀드모네 IT Blog

[textarea] To increase the height automatically 본문

Front

[textarea] To increase the height automatically

남명 팀드모네 2017. 10. 14. 02:00


[HTML]

<textarea class="test" onkeyup="this.style.height='26px'; this.style.height = this.scrollHeight + 'px';"></textarea>


[CSS]

.test {

    resize:none;

    line-height:30px;

    width:100%;

    overflow-y:hidden;

    height:30px;

}


thank!

0 Comments
댓글쓰기 폼