有一个网站,Web Design From Scratch (存档链接,不再有以下行为),浏览器首先渲染字体,然后标题文本快速闪烁,然后变成图像。
有人知道这里使用的是什么技术吗?
最佳答案
他们正在使用 Cufón :
<script type="text/javascript" src="/assets/cufon.js"></script>
<script src="/assets/Delicious_500.font.js" type="text/javascript"></script>
<script type="text/javascript">Cufon('h1');</script>
上面是将库应用于所有 h1 元素,我想。
实现此目的的另一种流行技术是 sIFR ,但是这需要 Flash。 Cufón 网站说:
Cufón aims to become a worthy alternative to sIFR, which despite its merits still remains painfully tricky to set up and use. To achieve this ambitious goal the following requirements were set:
- No plug-ins required – it can only use features natively supported by the client
- Compatibility – it has to work on every major browser on the market
- Ease of use – no or near-zero configuration needed for standard use cases
- Speed – it has to be fast, even for sufficiently large amounts of text
And now, after nearly a year of planning and research we believe that these requirements have been met.
关于css - 在这个网站上使用什么技术生成字体?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1015527/