【发布时间】:2019-11-27 07:06:13
【问题描述】:
我的网站 CSS 在 Firefox 中看起来都很好,但在 Chrome 和 Safari 中,我的字体看起来都是黑色而不是 Firefox 中的灰色。
为什么 Safari 和 Chrome 中的字体/颜色可能不同 - 它看起来像粗体黑色。
我在内容 div 中使用的标题样式,即:
#content {
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 18px;
color: #333;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-right-color: #990;
border-bottom-color: #990;
border-left-color: #990;
padding-bottom: 10px;
padding-right: 10px;
padding-left: 10px;
background-color: #FFF;
width: 973px;
text-align: left;
display: block;
background-image: url(images/bgcontent.jpg);
background-repeat: repeat;
}
h1 {
font-family: "Lucida Grande";
background-color: transparent;
height: 20px;
width: 650px;
color: #FF9904;
font-size: 36px;
text-align: left;
float: none;
vertical-align: top;
border-bottom-width: 2px;
border-bottom-style: solid;
border-bottom-color: #999;
letter-spacing: normal;
margin: 0;
padding: 0.5em 0;
}
我还发现了这个与谷歌浏览器相关的链接,即关于使用:
@charset "xxx"
http://www.google.com/chrome/intl/en/webmasters-faq.html#fontspecs
【问题讨论】:
-
你可能想发布一些代码示例
-
已为主要内容 div 添加了所需的样式,其中字体/颜色在 Chrome/Safari 中不正确。
标签: css firefox safari cross-browser google-chrome