admin管理员组文章数量:1023667
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
2 Answers
Reset to default 3Your 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});
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
2 Answers
Reset to default 3Your 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});
本文标签: javascriptCufon textShadowhover problemStack Overflow
版权声明:本文标题:javascript - Cufon textShadow + hover problem - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745592795a2157985.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论