如何制作垂直滚动的文本区域?

LA_*_*LA_ 1 html css scroll textarea

我有一个textareahtml 元素,其中可能包含 URL。用户应该能够单击此类 URL 将其打开。目前代码如下所示:

<textarea rows="26" class="form-control" disabled> {{ text|urlize }}</textarea>
Run Code Online (Sandbox Code Playgroud)

当然,目前不支持链接。看起来textarea应该用其他东西代替。我尝试使用div,但我不确定如何限制其高度(因为textarea我使用过rows="26")并使其可滚动。

FDI*_*FDI 5

请检查此代码

html

<div class="textarea"> </div>
Run Code Online (Sandbox Code Playgroud)

CSS

.textarea{
  width:50%;
  background-color:#eee;
  overflow:hidden;
  height:250px;
  max-height:250px;
  border:1px solid #ccc;
  overflow-y: auto;
}
Run Code Online (Sandbox Code Playgroud)

http://codepen.io/anon/pen/KpYOKq