<!DOCTYPE HTML>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
#textarea {
width:300px;
border:1px solid #ccc;
min-height:150px;
max-height:300px;
overflow:auto;
font-size:14px;
outline:none;
}
</style>
</head>
<body>
<div id="textarea" contenteditable="true">11111</div>
</body>
</html>
在ie,chrome,Firefox浏览器下测试通过,效果图: