javascript - Cufon Hover & Change of font syntax - Stack Overflow

Could someone help me rewrite this syntax below to get it right.I want the font to be replaced by my fo

Could someone help me rewrite this syntax below to get it right.

I want the font to be replaced by my font whilst accepting the :hover so my button will change when i hover over it.

 Cufon('button', {
    fontFamily: 'Disgrunged A',
    hover: {
        color: '#ed1c24'
    }
 });

Could someone help me rewrite this syntax below to get it right.

I want the font to be replaced by my font whilst accepting the :hover so my button will change when i hover over it.

 Cufon('button', {
    fontFamily: 'Disgrunged A',
    hover: {
        color: '#ed1c24'
    }
 });
Share Improve this question edited Apr 28, 2010 at 10:55 Andy asked Apr 28, 2010 at 8:24 AndyAndy 3,0219 gold badges45 silver badges63 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 3

You could try to add button to hoverables list

Cufon('button', {
    fontFamily: 'Disgrunged A',
    hover: {
        color: '#ed1c24'
    },
    hoverables: { button:true }
 });

Ref: Cufon API

hoverables
Defines which elements :hover is used with. Defaults to links only as IE6 can’t handle anything else.
example : { tag: true, .. }
default : { a: true }

i don't know cufon, but i think the syntax has to be like this:

 Cufon.replace('button:hover', {
    fontFamily: 'Disgrunged A'
 });

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745350052a4623776.html

相关推荐

  • javascript - Cufon Hover & Change of font syntax - Stack Overflow

    Could someone help me rewrite this syntax below to get it right.I want the font to be replaced by my fo

    6小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信