在网页中使用非标准字体? [英] Using non-standard font in web pages?

查看:497
本文介绍了在网页中使用非标准字体?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我被告知要使用非标准字体创建网站。客户端提供了字体文件(.otf格式)。是否有任何方式我可以让网页上的文本以指定的字体(非网络标准)显示?

I have been told to create a website using a non standard font. The client has supplied the font file (in the .otf format). Is there any way I can have the text on the webpage show up in the specified font (non-web standard) ?

除了使用sIFR,还有其他替代方法吗?

Is there any other alternative other than using sIFR ?

编辑:如何将此@ font-face仅应用于特定div?

EDIT : How do i apply this @font-face only to a particular div ?

推荐答案

您可以使用CSS @font -

You can use the CSS @font-face declaration for this.

但是,请注意:并非所有浏览器都支持 otf 格式。

您可以使用
FontSquirrel的字体生成器将字体转换为您需要的所有不同格式。它甚至会为您生成CSS,然后您只需将其复制并粘贴到您的项目中。

However, beware: not all browsers support the otf format.
You can use a tool such as FontSquirrel's Font-face Generator to convert the font into all the different formats you'll need. It'll even generate the CSS for you, which you'll then simply copy and paste into your project.

这篇关于在网页中使用非标准字体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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