Cufon - 忽略子类/元素
所以,我正在使用 Cufon & jQuery 并具有类似于
<h4>My Title ♥ Funny Symbols</h4>
我正在使用 WordPress 的标题,并且能够解析出 ♥ 符号并将它们包装在一个跨度中,所以我最终得到了类似于
<h4>My Title <span class="heart-wrap">♥</span> Funny Symbols</h4>
但是,现在我需要弄清楚如何让 Cufon 忽略内部跨度,作为正在使用的字体,没有心形符号;所以我希望它默认回到标准 Arial 字体或我决定在 CSS 中使用的任何字体,以便我可以设置符号的样式。
我环顾四周,看到了一些帖子并尝试了他们的示例,但似乎都不起作用。大多数似乎都针对多级导航等。有什么想法如何解决这个问题吗?将不胜感激。
谢谢!
编辑:
在评论中的链接中找到答案
Cufon.replace('h4', {
ignore: {
span: true
}
});
So, I am using Cufon & jQuery and have titles along the lines of
<h4>My Title ♥ Funny Symbols</h4>
I am using WordPress and am able to parse out the ♥ symbols and wrap them in a span so I end up with something along the lines of
<h4>My Title <span class="heart-wrap">♥</span> Funny Symbols</h4>
But, now I need to figure out how to make Cufon ignore the internal span, as the font that is being used, doesn't have a symbol for hearts; so I would like for it to default back to the standard Arial font or whatever I decide to use in the CSS so I can style the symbol.
I've looked around and I've seen some posts and tried their examples, but none of it seems to be working. Most seem to target multi-level navigation and all that. Any ideas how to solve this? Would be much appreciated.
Thanks!
EDIT:
Answer found in link in comment
Cufon.replace('h4', {
ignore: {
span: true
}
});
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
http://groups.google.com/group/cufon/browse_thread /thread/615af479894f6478?pli=1
http://groups.google.com/group/cufon/browse_thread/thread/615af479894f6478?pli=1