javascript - Cufon textShadow + hover problem - Stack Overflow

I only want the text-shadow to be on the hover state. **JS**Cufon.replace('.headerright', {h

I only want the text-shadow to be on the hover state.

**JS**
Cufon.replace('.headerright', {hover: true,'fontFamily' : 'League Gothic',textShadow:'0px 1px #cccccc'});
**CSS**
.headerright{text-transform:uppercase; font-size:76px;color:#CD7674;}
.headerright a:hover{color:#444444;}

I only want the text-shadow to be on the hover state.

**JS**
Cufon.replace('.headerright', {hover: true,'fontFamily' : 'League Gothic',textShadow:'0px 1px #cccccc'});
**CSS**
.headerright{text-transform:uppercase; font-size:76px;color:#CD7674;}
.headerright a:hover{color:#444444;}
Share Improve this question edited Aug 2, 2011 at 0:47 ThomasReggi asked Jun 12, 2010 at 23:07 ThomasReggiThomasReggi 59.8k97 gold badges260 silver badges460 bronze badges 2
  • 2 Sorry, I've never used cufon, but I think it's now better to start using the @font-face and shadows as part of CSS3... Paul Irish published a bullet proof method that even works with IE (paulirish./2009/bulletproof-font-face-implementation-syntax) – Mottie Commented Jun 13, 2010 at 0:32
  • Thanks fudgey, will start testing that approach tomorrow, very interesting! – danjah Commented Jul 19, 2011 at 12:51
Add a ment  | 

2 Answers 2

Reset to default 3

Your code is defining textShadow from the get-go rather than for the hover event.

Looking at https://github./sorccu/cufon/wiki/styling, this should work for you:

Cufon.replace('.headerright', {
    'fontFamily': 'League Gothic',
    hover: {
        textShadow: '0px 1px #cccccc'
    }
});
Cufon.replace('.menu_item', {fontFamily: 'museo700_regular',hover: {textShadow: '0px 1px #fff'},textShadow:'0px 1px #fff', hover:true});

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

相关推荐

  • javascript - Cufon textShadow + hover problem - Stack Overflow

    I only want the text-shadow to be on the hover state. **JS**Cufon.replace('.headerright', {h

    6小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

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

关注微信