【问题标题】:Cufon textShadow + hover problemCufon textShadow + hover问题
【发布时间】:2010-06-12 23:07:05
【问题描述】:

我只希望文本阴影处于悬停状态。

**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;}

【问题讨论】:

  • 对不起,我从未使用过 cufon,但我认为现在最好开始使用 @font-face 和阴影作为 CSS3 的一部分... Paul Irish 发布了一个防弹方法,甚至可以工作使用 IE (paulirish.com/2009/bulletproof-font-face-implementation-syntax)
  • 感谢 fudgey,明天将开始测试该方法,非常有趣!

标签: javascript jquery css cufon


【解决方案1】:

您的代码从一开始就定义 textShadow,而不是为 hover 事件定义。

看看https://github.com/sorccu/cufon/wiki/styling,这应该适合你:

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

【讨论】:

    【解决方案2】:
    Cufon.replace('.menu_item', {fontFamily: 'museo700_regular',hover: {textShadow: '0px 1px #fff'},textShadow:'0px 1px #fff', hover:true});
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-01-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多