完全离奇的Firefox CSS错误 [英] Completely bizarre Firefox CSS bug
问题描述
将以下HTML保存为一个文件,并在Firefox浏览(我的是3.6.3):
< html xmlns =http:// www .w3.org / 1999 / XHTML>
< head>
< style type =text / css>
body {font-family:Helvetica,Sans-Serif;}
h2 {font-weight:normal;}
< / style>
< / head>
< body>
< h2>一些普通文字< strong>粗体文字< / strong>怪怪的?< / h2>
< / body>
< / html>
如果你不想一口气输出就像你的猫走过你的键盘而字符映射被打开,除了 strong
标记。
我觉得这可能是一个字体问题?当我摆脱 谢谢。 以下是屏幕截图。它在所有其他浏览器中都能正常工作,所有以前没有被设置为粗体(正常文本)的文本都可以正常显示。 font-weight:normal
时,它会恢复正常,但我不希望所有内容都以粗体显示在 h2
...任何人有任何想法?更重要的是,是否有人能够重现这一点?
编辑
你检查了你的编码吗?
当你删除 Helvetica
或者 Sans-Serif
并将其替换为其他字体,是否也有同样的问题?例如,你是否尝试过使用另一种字体,然后是 Helvetica
和 Sans-Serif
的组合:
Courier
, Helvetica
Courier
, Sans-Serif
I've been doing front end development for a long time, and I have NEVER come across a bug like this before...
Save the following HTML to a file and view it in Firefox (mine is 3.6.3):
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
body { font-family: Helvetica, Sans-Serif;}
h2 {font-weight: normal;}
</style>
</head>
<body>
<h2>Some normal text <strong>some bold text</strong> weird huh?</h2>
</body>
</html>
If you don't want to give it a shot the output is like your cat walked across your keyboard while character map was turned on, except in the strong
tags.
I feel like this may be a font issue? When I get rid of font-weight: normal
it goes back to normal, but I don't want everything to be bolded in my h2
... Anyone have any ideas? More importantly, is anyone able to reproduce this??
Thanks.
EDIT
Here's a screenshot. It works fine in all other browsers, and all text that has not previously been set as bold (normal text) renders fine.
Have you checked your encoding?
When you remove Helvetica
or Sans-Serif
and replace them with other fonts, do you have the same problem? For example, have you tried using another fonts and then combinations of Helvetica
and Sans-Serif
with those:
Courier
, Helvetica
Courier
, Sans-Serif
这篇关于完全离奇的Firefox CSS错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!