开发者

Textshadow not working on CUFON

I am trying to apply a text-shadow effect to Cufon, following some examples I've found online, but it isn't working.

My code, before adding the text shado bit was:

Cufon.replace('h3.upper'); 

...which worked perfectly. Then I added:

Cufon.replace('h3.upper', {
textShadow: '-5px -5px #000'
}); 

But it doesn't do anything. The font replacement still works, but not the shadow. I don't think it matters, but I am using the League Gothic开发者_JAVA技巧 typeface.


No idea why it wasn't working with that syntax, but i found a different way to do it that works:

Cufon.replace('h2.no-shadow');
Cufon.replace('h3.no-shadow');
Cufon.set('textShadow', '3px 1px 0 #BF6017'); 
Cufon.replace('h2.with-shadow'); 
Cufon.replace('h3.with-shadow'); 

Every replacement configured after the Cufon.set will have the properties that we specify. This can be very useful to organise your Cufon replacements file, as well. Hope this is useful to somebody.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜