简体   繁体   English

如何将菜单上的Cufon字体的悬停颜色更改为红色?

[英]How do I change the hover color to red for Cufon fonts on menu?

I have made a menu with Cufon fonts. 我用Cufon字体做了一个菜单。 They are working but I am unable to make HOVER effects on the font. 它们正在工作,但是我无法对字体进行悬停效果。 Here is the code I used 这是我使用的代码

Cufon.replace('#tag', {
fontFamily: 'ChunkFive',
color: 'White',
hover: true,
textShadow: '1px 1px #555' });

I wish to use BLUE color when hovering the mouse over a menu link. 将鼠标悬停在菜单链接上时,我希望使用蓝色。 How can I do that? 我怎样才能做到这一点?

Thanks, Niladri 谢谢,Niladri

You should use cufon.Refresh() after you load the hover. 加载悬停后,应使用cufon.Refresh() Everytime you make a modification to an existing cufon element, you need to run refresh to update the element. 每次对现有cufon元素进行修改时,都需要运行refresh以更新该元素。

Additionally, also try this article - http://galinsimeonov.com/?p=74 . 此外,也请尝试这篇文章-http://galinsimeonov.com/?p=74 Explains the use of Replace and also the FOUC effect that arises with using Cufon. 说明“替换”的用法以及使用Cufon时产生的FOUC效果。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将颜色更改为选项卡菜单 - How do I change color to a tab menu Cufon Hover&更改字体语法 - Cufon Hover & Change of font syntax 如何更改hover上材质ui卡的背景颜色? - how do I change background color of material ui card on hover? 单击交换按钮时,如何使红色div更改背景颜色以在红色和绿色之间切换? - How do I get my red div to change background color to toggle between red and green when I click on the swap button? 我希望球撞到墙上时颜色变为红色。如何添加该代码? - I want the color of the ball to change the red when it hits the wall.How do I add that code? 如何更改菜单选项卡html的活动颜色? - How do I change the active color of menu tab html? 如何在 Ant Design 中更改所选菜单项的颜色? - How do I change the color of selected menu item in Ant Design? 如何根据另一个字段中的值将字段边框颜色更改为红色? - How do I change the field border color to red based on a value in another field? 我如何 hover 更改汉堡菜单颜色,单击汉堡菜单将其转换为 x 并显示内容下拉菜单? - How do I hover to change the hamburger menu colour, click the hamburger menu to transform it to x and have the contents dropdown? javascript新手,如何更改-> document.write(schedule [row] ['title']))的颜色; 变成红色? - new to javascript, how do i change color of --> document.write(schedule[row]['title']); to red?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM