删除IE8中select元素中的多余填充 [英] Remove excess padding inside select element in IE8

查看:115
本文介绍了删除IE8中select元素中的多余填充的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用CSS从选择元素中删除样式。例如:
http://jsfiddle.net/HTseX/

I'm trying to remove styling from select elements using CSS. For example: http://jsfiddle.net/HTseX/

无论我尝试什么,在元素的边框和文本之间有额外的填充,主要是在IE8。 Firefox,Chrome和IE9彼此相似,但IE8更高。

No matter what I try, there is extra padding between the border of the element and the text, mainly in IE8. Firefox, Chrome and IE9 are simliar to each other, but IE8 is taller.

我猜这是不可能的。我总是尝试在所有浏览器中使用相同的代码,所以我试图确保我确实需要做特定的编码为IE8,或使用JS下拉。

I'm guessing it just isn't possible. I always try to use the same code in all browsers, so I'm try to make sure I actually need to do specific coding for IE8, or use JS pulldowns.

推荐答案


根据使用的浏览器和操作系统,选择呈现略有不同,是众所周知的一个麻烦的HTML元素与CSS风格(因为显示是继承自操作系统,而不是由浏览器提供)。

The select renders slightly differently depending on the browser and operating system in use, and is well known as a troublesome HTML element to style with CSS (because the display is inherited from the operating system, rather than provided by the browser).

参考

这篇关于删除IE8中select元素中的多余填充的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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