【发布时间】:2015-08-01 03:59:50
【问题描述】:
我曾与一个特定的宽度和高度textarea的让我怎么创建一个字母柜台,并设置在textarea的类型应该不超过100个字的最大字母。
HTML
<div class="box">
<textarea name="" id=""></textarea>
<div class="word-counter">0/100</div>
</div>
CSS
.box {
width:500px;
border: 1px solid red;
position:relative;
display:table;
}
textarea {
width:500px;
height:80px;
padding-bottom: 20px;
}
.word-counter {
position:absolute;
bottom: 0;
right:0;
}
【问题讨论】:
-
类似的功能已经在这里讨论过:stackoverflow.com/questions/30332301/…