编辑您的代码:提交代码

x
 
1
 
2
 
3
<!DOCTYPE html>
4
<html>
5
<head>
6
<style> 
7
@font-face
8
{
9
font-family: myFirstFont;
10
src: url('/example/css3/Sansation_Light.ttf')
11
    ,url('/example/css3/Sansation_Light.eot'); /* IE9+ */
12
}
13
14
@font-face
15
{
16
font-family: myFirstFont;
17
src: url('/example/css3/Sansation_Bold.ttf')
18
    ,url('/example/css3/Sansation_Bold.eot'); /* IE9+ */
19
font-weight:bold;
20
}
21
22
div
23
{
24
font-family:myFirstFont;
25
}
26
</style>
27
</head>
28
<body>
29
30
<div>
31
With CSS3, websites can <b>finally</b> use fonts other than the pre-selected "web-safe" fonts.
32
</div>
33
34
<p><b>注释:</b>Internet Explorer 9+ 支持新的 @font-face 规则。Internet Explorer 8 以及更早的版本不支持新的 @font-face 规则。</p>
35
36
</body>
37
</html>
38
            

查看结果:

请在上面的文本框中编辑您的代码,然后单击提交按钮测试结果。w3c0.com

W3c0.com 提供的内容仅用于培训。我们不保证内容的正确性。通过使用本站内容随之而来的风险与本站无关。W3c0 简体中文版的所有内容仅供测试,对任何法律问题及风险不承担任何责任。 当使用本站时,代表您已接受了本站的使用条款和隐私条款。版权所有,保留一切权利。 鲁ICP备15022115号