LA_*_*LA_ 1 html css scroll textarea
我有一个textarea
html 元素,其中可能包含 URL。用户应该能够单击此类 URL 将其打开。目前代码如下所示:
<textarea rows="26" class="form-control" disabled> {{ text|urlize }}</textarea>
Run Code Online (Sandbox Code Playgroud)
当然,目前不支持链接。看起来textarea
应该用其他东西代替。我尝试使用div
,但我不确定如何限制其高度(因为textarea
我使用过rows="26"
)并使其可滚动。
请检查此代码
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