库丰未出现

发布于 2024-11-14 04:08:55 字数 1144 浏览 7 评论 0原文

我不明白为什么我的 Cufon 不工作,所有 .js 文件加载正常:

    <!DOCTYPE html>
<html lang="en">
<head>

<title>Company Name</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="includes/css/style.css?v=2" media="all">
<!-- Grab Google CDN's jQuery. fall back to local if necessary -->
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
    <script>!window.jQuery && document.write(unescape('%3Cscript src="includes/js/jquery-1.6.min.js"%3E%3C/script%3E'))</script>
<script src="includes/js/cufon.js"></script>
<script src="includes/js/Springsteel_Lig_300.font.js"></script>
<script>
        window.addEvent('domready',function() {
                    Cufon.replace('header h1');
                });
</script>
<body>

<div id="container">

<header>
                <h1>Company</h1>
                <div id="logo"><a href="http://Company.co.nz/">Home</a></div>

I cannot understand why my Cufon is not working, All .js files load fine:

    <!DOCTYPE html>
<html lang="en">
<head>

<title>Company Name</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="includes/css/style.css?v=2" media="all">
<!-- Grab Google CDN's jQuery. fall back to local if necessary -->
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
    <script>!window.jQuery && document.write(unescape('%3Cscript src="includes/js/jquery-1.6.min.js"%3E%3C/script%3E'))</script>
<script src="includes/js/cufon.js"></script>
<script src="includes/js/Springsteel_Lig_300.font.js"></script>
<script>
        window.addEvent('domready',function() {
                    Cufon.replace('header h1');
                });
</script>
<body>

<div id="container">

<header>
                <h1>Company</h1>
                <div id="logo"><a href="http://Company.co.nz/">Home</a></div>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

翻了热茶 2024-11-21 04:08:55

尝试将:更改

<script>
    window.addEvent('domready',function() {
        Cufon.replace('header h1');
    });
</script>

为:

<script type="text/javascript">
    Cufon.replace('header h1');
</script>

这样的更改后它对我有用(使用 Vegur.font.js 字体,在 Opera 11 和 Google Chrome 11 上测试)。

编辑:

Springsteel_Lig_300.font.js 字体一起使用。我刚刚下载了 Springsteel Light 字体 (springsteel-lig.otf) 并使用了 该网站以js格式生成。

在此处输入图像描述

Try with changing:

<script>
    window.addEvent('domready',function() {
        Cufon.replace('header h1');
    });
</script>

to just:

<script type="text/javascript">
    Cufon.replace('header h1');
</script>

It works for me after such change (using Vegur.font.js font, tested on Opera 11 and Google Chrome 11).

Edit:

Works as well with Springsteel_Lig_300.font.js font. I just donloaded Springsteel Light font (springsteel-lig.otf) and used that site to generate in js format.

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文