如何禁用IE8中textareas的默认滚动条? [英] How to disable default scroll bar for textareas in IE8?

查看:90
本文介绍了如何禁用IE8中textareas的默认滚动条?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我经历了一些我的旧网站,我有一个联系表单,在IE8总是有一个垂直滚动条显示我的textareas,即使没有内容。

I am going through some of my older sites where I have a contact form and in IE8 there always is a vertical scroll bar displayed for my textareas, even when there is no content.

在Firefox中,直到文本区域中的内容达到需要的高度后,它才会存在垂直滚动条。

In Firefox, it doesn't seem to make the vertical scroll bar exist until the content in the textarea reaches a height that deems them necessary.

在我的旧网站上设置了我的输入框,默认显示的滚动条使它们看起来很丑陋。

I have styled my input boxes on my older sites, and a scroll bar appearing by default makes them look quite ugly.

我的问题,或者它只是一个默认的IE8行为?

My question, is there anything I can do about this, or is it just a default IE8 behaviour?

我已经尝试设置 overflow:auto

推荐答案

我现在无法测试IE8,但我可以告诉你,这在IE6:

I can't test on IE8 right now, but I can tell you that this works in IE6:

textarea {
  overflow-y: auto;
}

这篇关于如何禁用IE8中textareas的默认滚动条?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆