textarea {
padding: 10px;
vertical-align: top;
width: 200px;
resize:none;
outline:none;
}
textarea:focus {
outline-style: solid;
outline-width: 2px;
}
max-height 300px
The coconut palm (also, cocoanut), Cocos nucifera, is a member of the family Arecaceae (palm family). It is the only accepted species in the genus Cocos.[2] The term coconut can refer to the entire coconut palm, the seed, or the fruit, which, botanically, is a drupe, not a nut. The spelling cocoanut is an archaic form of the word.[3] The term is derived from 16th-century Portuguese and Spanish coco, meaning "head" or "skull",[4] from the three small holes on the coconut shell that resemble human facial features.
no max-height
The coconut palm (also, cocoanut), Cocos nucifera, is a member of the family Arecaceae (palm family). It is the only accepted species in the genus Cocos.[2] The term coconut can refer to the entire coconut palm, the seed, or the fruit, which, botanically, is a drupe, not a nut. The spelling cocoanut is an archaic form of the word.[3] The term is derived from 16th-century Portuguese and Spanish coco, meaning "head" or "skull",[4] from the three small holes on the coconut shell that resemble human facial features.
autosize(document.querySelectorAll('textarea'));
Autosize下载:autosize.zip 最好去下载官方最新的版本。
注意,以上案例代码中,还用css3样式去掉textarea标签的右下角拖动元素修改尺寸大小属性(resize:none)和轮廓线(outline:none)。