无法减少标题1的粗体大小

时间:2013-04-22 06:24:38

标签: css html5 web header

我试图让h1中的字体不那么粗体。这些字母似乎只是为了胖。

CSS:

h1 {color: #FFFFFF; font-family: ballparkweiner; font-size: 110px;
text-align: center; margin: 0px; }

@font-face {
    font-family: 'ballparkweiner';
    src: url('ballw___.eot');
    src: url('ballw___.eot?#iefix') format('embedded-opentype'),
         url('ballw___.woff') format('woff'),
         url('ballw___.ttf') format('truetype'),
         url('ballw___.svg#ballparkweiner') format('svg');
    font-weight: normal;
    font-style: normal;

}


h2 { margin: 0px; text-align: center; font-size: 40px; color: #FFFFFF; font-family: Cambria;}

body {background-color: #000000;}

h3 {text-align: center; color: #FFFFFF; }

#footer { font-weight: bold; text-align: center; font-family: Audimat;
    clear: both; width:48%;
        border-radius: 8px;
        background-color:black;
        text-align:center; margin-right:auto;
        margin-left:auto; color: #FFFFFF; }

根据我在线收集的信息,大多数人都说使用font-weight:打火机;

但是当我使用css验证器时,这不会验证。有什么想法吗?

3 个答案:

答案 0 :(得分:1)

添加:

h1 { font-weight: normal; }

默认情况下,浏览器使用bold权重h1。由于您的@font-face仅声明normal重量字体,(某些)浏览器将通过算法粗体显示字形(即,使用一些简单的方法使笔画更宽)。

答案 1 :(得分:0)

我检查了你的css验证,你在哪里检查过?可能你检查过css2验证。在这里查看这个是原创的/最好的http://jigsaw.w3.org/css-validator/validator

答案 2 :(得分:0)

我实际上只是添加了字体粗细线(我把它放在@font面下)

h1 {color: #FFFFFF; font-family: ballparkweiner; font-size: 110px;
text-align: center; margin: 0px; font-weight: lighter; }