css - UCO(未识别的 CSS 对象)在 Firefox 中向我的文本区域添加更大的字体大小

标签 css fonts

我正在构建一个包含 3 个字段的表单:#name、#mail 和 #message。第一个和第二个字段的字体大小相同,但最后一个字段 (#message) 的字体大小仅在 Firefox 上更大。

这是我用 Firebug 检查时 #message 的 CSS:

 ....loading....

body {
color:#666666;
font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;
font-size:14px;
line-height:130%;
margin:0;
padding:0;
}
screen.css (line 3)
#message {
height:100px;
width:200px;
}
global.css (line 189)
#name, #email, #message {
font-family:Arial,"MS Trebuchet",sans-serif;
margin:0 0 10px;
padding:6px;
}
global.css (line 182)
Inherited fromdiv#form
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
font-size:100%;
}
global.css (line 2)
Inherited fromdiv#contact
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
font-size:100%;
}
global.css (line 2)
Inherited fromdiv.container
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
font-size:100%;
}
global.css (line 2)
Inherited fromdiv#footer
#footer {
color:#DDDDDD;
}
global.css (line 145)
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
font-size:100%;
}
global.css (line 2)
Inherited frombody#home
body {
color:#666666;
font-family:Arial,"MS Trebuchet",sans-serif;
font-size:75%;
}
global.css (line 27)
body {
line-height:1;
}
global.css (line 12)
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
font-size:100%;
}
global.css (line 2)
Inherited fromhtml
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
font-size:100%;
}
global.css (line 2)

我的 Firefox chrome 文件夹 (userContent.css) 中有这个:

input, select, button,textearea {
 font-family: Arial !important; 
}

pre, code {
 font-family: Consolas !important; 
}

这是我用 Firebug 检查时 #name 的 CSS:

 ....loading....

body {
color:#666666;
font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;
font-size:14px;
line-height:130%;
margin:0;
padding:0;
}
screen.css (line 3)
#name, #email, #message {
font-family:Arial,"MS Trebuchet",sans-serif;
margin:0 0 10px;
padding:6px;
}
global.css (line 182)
input, select, button, textearea {
}
userContent.css (line 1)
Inherited fromdiv#form
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
font-size:100%;
}
global.css (line 2)
Inherited fromdiv#contact
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
font-size:100%;
}
global.css (line 2)
Inherited fromdiv.container
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
font-size:100%;
}
global.css (line 2)
Inherited fromdiv#footer
#footer {
color:#DDDDDD;
}
global.css (line 145)
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
font-size:100%;
}
global.css (line 2)
Inherited frombody#home
body {
color:#666666;
font-family:Arial,"MS Trebuchet",sans-serif;
font-size:75%;
}
global.css (line 27)
body {
line-height:1;
}
global.css (line 12)
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
font-size:100%;
}
global.css (line 2)
Inherited fromhtml
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
font-size:100%;
}
global.css (line 2)

这是我用 Firebug 检查 #mail 时的 CSS:

....loading....

body {
color:#666666;
font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;
font-size:14px;
line-height:130%;
margin:0;
padding:0;
}
screen.css (line 3)
#name, #email, #message {
font-family:Arial,"MS Trebuchet",sans-serif;
margin:0 0 10px;
padding:6px;
}
global.css (line 182)
input, select, button, textearea {
}
userContent.css (line 1)
Inherited fromdiv#form
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
font-size:100%;
}
global.css (line 2)
Inherited fromdiv#contact
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
font-size:100%;
}
global.css (line 2)
Inherited fromdiv.container
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
font-size:100%;
}
global.css (line 2)
Inherited fromdiv#footer
#footer {
color:#DDDDDD;
}
global.css (line 145)
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
font-size:100%;
}
global.css (line 2)
Inherited frombody#home
body {
color:#666666;
font-family:Arial,"MS Trebuchet",sans-serif;
font-size:75%;
}
global.css (line 27)
body {
line-height:1;
}
global.css (line 12)
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
font-size:100%;
}
global.css (line 2)
Inherited fromhtml
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
font-size:100%;
}
global.css (line 2)

最佳答案

您可以对字体大小定义做的最好的事情之一是使用 em 单位大小而不是 px 大小。

不过,由于缺少其他两种样式(#name、#mail),此 CSS 不能提供太多信息。对于其他两个,您可以轻松地比较它们,看看有什么不同。

关于css - UCO(未识别的 CSS 对象)在 Firefox 中向我的文本区域添加更大的字体大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2164876/

相关文章:

android - 网页在除 Android 浏览器外的所有浏览器上运行良好,Android 浏览器显示更大的字体

jquery - 用响应覆盖图像上的文本

html - Chrome 中的字体太模糊 - 我该如何解决?

html - 避免文字在图片周围流动

html - 如何使 x-overflow 在表而不是窗口上呈现?

javascript - 如何让一个绝对定位的div填满整个文档区域

java - 如何使用自定义字体使我的 JLabel 文本具有抗锯齿效果?

iphone - 在 iPhone 上绘制 Unicode 字符

html - Century Gothic字体效果图

c# - ItextSharp Font.BaseFont 为某些字体返回 Null