实例首页
自学教程
IT工具箱
源代码
下载代码
上下布局
点击运行 >
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>css @font-face 定义字体 实例 - 自学教程(runoops.com)</title> <style> @font-face { font-family: myFirstFont; src: url('//demo.runoops.com/static/font/Sansation-Light.ttf'), url('//demo.runoops.com/static/font/Sansation-Light.eot'); /* IE9 */ } div { font-family: myFirstFont; } </style> </head> <body> <p><b>注意:</b> Internet Explorer 9 只支持 .eot 格式的字体.</p> <div> 使用 CSS3,网站终于可以使用字体以外的预先选择“合法”字体 </div> </body> </html>
运行结果: