Cufon 字体替换:如何定义“hoverables”
使用 Cufon 字体替换,您可以像这样定义悬停状态:
<script type="text/javascript">
Cufon.replace('h1', {
hover: true,
hoverables: { strong: true, em: true }
});
});
</script>
Is it possible to描述hoverables的特定CSS类吗?
(我有一个表现奇怪的JQuery手风琴菜单,并且我认为定义这些可悬停对象将解决问题,如果有帮助的话,这里是菜单)。
With Cufon font replacement, you can define hover states like this:
<script type="text/javascript">
Cufon.replace('h1', {
hover: true,
hoverables: { strong: true, em: true }
});
});
</script>
Is it possible to describe specific CSS classes for the hoverables?
(I have a JQuery accordion menu that is behaving strangely, and I think defining these hoverables will solve the problem. If it helps at all, here is the menu).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我想这应该有用
This should work i guess
您可以通过将对象传递给
hover< 来定义 Cufon 目标上的悬停样式/code> 属性,而不是像您在问题中尝试的那样的
hoverables
属性:hoverables
属性可让您在a
标签 - Cufon 默认只在锚标签上启用悬停样式,因为 IE6 不支持其他任何内容,但您可以选择使用以下语法启用对其他元素的支持:You can define hover styles on Cufon targets by passing an object to the
hover
property, not to thehoverables
property like you have attempted in your question:The
hoverables
property is available to allow you to enable hover state on elements other thana
tags - Cufon defaults to only enabling hover styles on anchor tags because IE6 did not support anything else, but you can choose to enable support for other elements using the following syntax: