CSS很细字体? [英] CSS very thin font?

查看:1302
本文介绍了CSS很细字体?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用CSS创建非常细的字体,例如 http://www.google.com/landing/newgadgets/



现在我使用这个,但是我在mac上,我不认为窗口支持Helvetica Neue。

  h1 {
font-size:64px;
font-family:Helvetica Neue,Helvetica,Arial,sans-serif;
font-weight:100;
}

对薄而脆的字体有什么想法吗?

解决方案

Google正在使用其字体API 和CSS的 @ font-face / p>

在其代码中查看以下参考:

 < link href =// fonts.googleapis.com/css?family=Open+Sans:300,400,600,700&amp;subset=latin =stylesheet> 

下面是registers字体的确切定义:

  @ font-face {
font-family:'Open Sans';
font-style:normal;
font-weight:400;
src:local('Open Sans'),local('OpenSans'),url('http://themes.googleusercontent.com/static/fonts/opensans/v5/cJZKeOuBrn4kERxqtaUH3T8E0i7KZn-EPnyo3HZu7kw.woff')格式('woff');
}

然后,他们只是将该字体应用于element / s:

  h1,h2,h3,h4,blockquote,q,.maia-nav ul {
font-family:'open sans'无国界
}

注意 @ font-face 字体在下层浏览器上不能清晰呈现。如果您需要支持他们,请尝试 - http://cufon.shoqolate.com/


How do I create very thin fonts with CSS, like at http://www.google.com/landing/newgadgets/ ?

Right now I'm using this, but I'm on a mac and I don't think "Helvetica Neue" is supported on windows.

h1{
  font-size:64px;
  font-family:Helvetica Neue, Helvetica, Arial, sans-serif;
  font-weight:100;
}

Any ideas for thin, crisp fonts?

解决方案

Google is using their font API and CSS's @font-face

See the following reference in their code:

<link href="//fonts.googleapis.com/css?family=Open+Sans:300,400,600,700&amp;subset=latin" rel="stylesheet">

Below is the exact definition that "registers" said font:

@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400;
  src: local('Open Sans'), local('OpenSans'), url('http://themes.googleusercontent.com/static/fonts/opensans/v5/cJZKeOuBrn4kERxqtaUH3T8E0i7KZn-EPnyo3HZu7kw.woff') format('woff');
}

Then they simply apply that font to element/s:

h1, h2, h3, h4, blockquote, q, .maia-nav ul {
   font-family: 'open sans',arial,sans-serif;
}

Note: @font-face fonts don't render crisply on downlevel browsers. If you need to support them try - http://cufon.shoqolate.com/

这篇关于CSS很细字体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆