排除 Elements 被 cufon 替换?

发布于 2024-12-04 07:29:13 字数 109 浏览 4 评论 0原文

如果我已设置 cufon 用字体替换所有 h1 元素,我可以排除具有特定类的元素吗?

例如,cufon 会替换页面上除“nocufon”类元素之外的所有 h1 元素。

谢谢

If I have set cufon to replace all h1 elements with a font, can I exclude elements with specific classes?

So for example, cufon replaces all h1 elements on a page except for elements with a class of 'nocufon'.

Thanks

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

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

发布评论

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

评论(1

江南月 2024-12-11 07:29:13

我还没有对此进行测试,但这应该可以工作

cufon.replace('h1:not(.nocufon)', {fontFamily:'myfont'});

。要使其工作,您可能还必须包含 jQuery 或 MooTools,或其他一些受支持的选择器。 https://github.com/sorccu/cufon/wiki/usage

I have not tested this, but this should work

cufon.replace('h1:not(.nocufon)', {fontFamily:'myfont'});

For this to work, you may also have to include jQuery or MooTools, or some other supported selector. https://github.com/sorccu/cufon/wiki/usage

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