Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/90.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/41.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使文本框在溢出css html中垂直滚动?_Html_Css - Fatal编程技术网

如何使文本框在溢出css html中垂直滚动?

如何使文本框在溢出css html中垂直滚动?,html,css,Html,Css,这个问题以前可能已经被问过了,但我找不到一个对我有帮助的问题。无论如何,我已经用以下脚本创建了一个文本框: css: .cln{ 顶部:220px; 宽度:680px; 高度:350px; 文本对齐:左对齐; 溢出:滚动; 空白:nowrap; 溢出:隐藏; 文本溢出:省略号; } 使用文本区域不输入 <textarea class="cln" placeholder="That is my pet right there:)" /> 使用textarea如下所示。它将自动滚动

这个问题以前可能已经被问过了,但我找不到一个对我有帮助的问题。无论如何,我已经用以下脚本创建了一个文本框:

css:

.cln{
顶部:220px;
宽度:680px;
高度:350px;
文本对齐:左对齐;
溢出:滚动;
空白:nowrap;
溢出:隐藏;
文本溢出:省略号;
}
使用文本区域不输入

<textarea  class="cln" placeholder="That is my pet right there:)" />

使用
textarea
如下所示。它将自动滚动

这将自动滚动…

你能用文本区代替输入吗

<textarea type="text" class="cln" placeholder="That is my pet right there:)" maxlength="2024"/></textarea>


您应该使用
textarea
来实现这一点。尝试添加textarealine仍然不是垂直滚动的,而是垂直滚动的horizontal@John,再次查看它。k刚刚发现了它,必须删除我的css中的
空白
,无论如何,谢谢