从textarea中删除滚动条 [英] Remove scrollbars from textarea
问题描述
跟进我之前的问题(将滚动条添加到 ) 关于如何始终在 中看到滚动条,我现在想知道如何设置它以便
我该怎么做?
尝试以下方法,不确定哪种方法适用于所有浏览器或您正在使用的浏览器,但最好全部尝试:
或
...如上所述
你也可以试试加这个,我以前没用过,今天刚在一个网站上看到:
最后一个选项将取消调整textarea
大小的能力.您可以在此处中找到有关 CSS resize
属性的更多信息>
Following up to my previous question (Add a scrollbar to a <textarea>) on how to always see the scrollbar in a <textarea>
, I am now wondering how you would set it so that there is no scrollbar in the <textarea>
, even when the text overflows. To scroll down with this, you would use the arrow keys or the mouse to navigate through the text.
How can I do this?
Try the following, not sure which will work for all browsers or the browser you are working with, but it would be best to try all:
<textarea style="overflow:auto"></textarea>
Or
<textarea style="overflow:hidden"></textarea>
...As suggested above
You can also try adding this, I never used it before, just saw it posted on a site today:
<textarea style="resize:none"></textarea>
This last option would remove the ability to resize the textarea
. You can find more information on the CSS resize
property here
这篇关于从textarea中删除滚动条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!