Textshadow not working on CUFON

拥有回忆 提交于 2019-12-12 18:15:52

问题


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 typeface.


回答1:


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.



来源:https://stackoverflow.com/questions/5145371/textshadow-not-working-on-cufon

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!