如何重置默认按钮样式在Firefox 4 + [英] How to reset default button style in Firefox 4 +

查看:168
本文介绍了如何重置默认按钮样式在Firefox 4 +的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Firefox 3.6中,你可以使用 :: - MOZ对焦,内{边界:0;填充:0;保证金:0;} 来删除这些默认边距和垫 forms.css 补充说。

In firefox 3.6 you could use ::-moz-focus-inner {border:0;padding:0;margin:0;} to remove those default margins and paddings forms.css added.

我如何在Firefox 4重置此?我一直在寻找能增加样式到我的按钮,但找不到任何为FF4的安装目录内的任何.css文件 - 按钮仍然得到恼人1px的顶部填充,将不允许文本对齐垂直中间。

How can I reset this in Firefox 4? I've been searching for any .css files inside the install directory that could add styles to my button but can't find any for ff4 - the button still gets that annoying 1px top padding that won't allow the text to align to vertical middle.

编辑:我使用了一个复位样式所以没有必要重新风格。它是搞乱这里浏览器的样式表。

I use a reset stylesheet so no need to reset styles. It's a browser stylesheet that's messing here.

推荐答案

我居然找到了解决办法喽。

I actually found the solution myself.

在您的URL字段中键入:资源://gre-resources/forms.css - 这将打开forms.css的FF4 - 和搜索以下选择

In your url field type: resource://gre-resources/forms.css - this will open forms.css for FF4 - and search for the following selector

button::-moz-focus-inner,
input[type="reset"]::-moz-focus-inner,
input[type="button"]::-moz-focus-inner,
input[type="submit"]::-moz-focus-inner,
input[type="file"] > input[type="button"]::-moz-focus-inner

现在只是把在你的主样式表,如:

Now just put that in your main stylesheet like:

button::-moz-focus-inner,
input[type="reset"]::-moz-focus-inner,
input[type="button"]::-moz-focus-inner,
input[type="submit"]::-moz-focus-inner,
input[type="file"] > input[type="button"]::-moz-focus-inner {border:0;padding:0;margin:0;}

它不应再重写你的CSS。另外请注意,如果你还没有为你的输入定义的字体样式FF不能承受身体的字体样式。

It shouldn't be overriding your css anymore. Also note that if you haven't defined any font style for your inputs FF won't inherit body font styling.

这篇关于如何重置默认按钮样式在Firefox 4 +的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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