css - 相同的字体在 Chrome 与 Firefox、IE 和 Safari 中看起来不同

标签 css google-chrome firefox safari webfonts

此问题与在不同浏览器中呈现字体有关。我惊讶地发现这个问题只在 Chrome 中重现。它在 Firefox、IE8、Safari 甚至 IE6 中运行良好。

示例来了。

enter image description here

下面是代码本身:

<div style="position:absolute;bottom:2px;padding-top: 1px;width:100%;">
   <span style="float:left;">
      <div id="saveCustomizationButton" class="smallBlueButton">
         <span>Speichern</span>
      </div>
   </span>
   <span style="float:right;padding-right:1px;">
      <div id="downloadOrPrintButton" class="smallGreenButton smallGreenButtonSmallLetterSpace">
         <span>Downloaden oder drucken</span>
      </div>
   </span>
</div>

div.smallGreenButton span, div.smallGreenButton a {
    display: block;
    line-height: 14px;
    padding: 1px 7px 2px 13px;
}
div.smallGreenButton {
    font-family: arial,sans-serif;
    font-size: 12px;
    font-weight: 600;
}
div.smallBlueButton {
    font-family: arial,sans-serif;
    font-size: 12px;
    font-weight: 600;
}

就是这样。我读过有关 css reset 的文章,并尝试过。任何奇迹——什么都没有改变。我被认为使用的另一种方法是固定容器标签的宽度。但是由于需要维护多个本地化,我不能使用这种方法。

希望smb提出解决方案。或者我需要实现一些特定于浏览器的行为。

等待您的评论。提前致谢。

最佳答案

文本呈现确实因浏览器而异。有时无论我们如何尝试更改呈现方式,我们都不会得到它。你可以阅读this文章如果你想要。它没有为这个问题提供解决方案(我认为没有),但它强调了差异。

关于css - 相同的字体在 Chrome 与 Firefox、IE 和 Safari 中看起来不同,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14401235/

相关文章:

html - 居中 React-Grid-Gallery ReactJS 库

javascript - 如何在 Selenium 的特定页面上禁用 javascript?

javascript - onaddstream 在重新协商后从未调用过

javascript - 不切换到 IE 或 Firefox 中的窗口

7 秒幻灯片图像后的 Javascript

javascript - CSS3 过渡不能重复

html - Sass::SyntaxError in Static_pages#home - ""之后无效的 CSS:尝试将代码添加到 CSS 文件时出错

html - 消除 Chrome 在 html 表单的文本字段中所做的黄色突出显示

google-chrome - 谷歌浏览器 : refresh duplicate tab

html - 在包含 SVG 标记元素的页面上使用基本标记无法呈现标记