谷歌Web字体,字体重量变化

时间:2014-10-21 14:09:58

标签: html css fonts font-size google-webfonts

出于某种原因,导航菜单中的我的谷歌网络字体不断改变其页面之间的重量,虽然我已将其设置为700.菜单的CSS在每页上都相同。有人可以告诉我发生了什么,因为我以前从未发现过。

为了将来的后代,我会在有人回答后立即删除实时链接。谢谢!

我的CSS是

* {
font-family: 'Lato', sans-serif;
}

#menu {
font-weight:700;
display: table;
width: 100%;
list-style: none;
position: relative;
top: -20px;
text-align: center;
left: -10px;
-webkit-box-shadow: 0px 3px 5px 0px rgba(50, 50, 50, 0.75);
-moz-box-shadow: 0px 3px 5px 0px rgba(50, 50, 50, 0.75);
box-shadow: 0px 3px 5px 0px rgba(50, 50, 50, 0.75);
font-size: 18px;
height: 20px;
z-index: -101;
}

1 个答案:

答案 0 :(得分:0)

首先,你需要解决这个问题:

body {
background-color: #FFF;
background-image: url(bg.png);
color: #D6D6D6;
font-family: font-family: 'Lato', sans-serif;
}

你的font-family声明是重复的。

其次,700类正在覆盖您的#menu li a

#menu li a {
  display: block;
  padding: 2px 10px;
  text-decoration: none;
  font-weight: lighter; /*should be changed to 700*/
  white-space: nowrap;
  color: #333;
}
相关问题