Cufon.refresh() 在 IE8 中不起作用
获取 AJAX 数据后我需要刷新 Cufon 字体。不幸的是,简单的 Cufon.refresh() 在 IE8 中不起作用。调试器说,第 1191 行
sStyle.width = roundedShapeWidth;
有无效参数。
如何修复它?
I need to refresh Cufon fonts after getting AJAX data. Unfortunately simple Cufon.refresh() don`t work in IE8. Debugger says, tah the line 1191
sStyle.width = roundedShapeWidth;
has Invalid argument.
How to fix it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我也有同样的问题。不仅在 Cufon.Refresh 中,而且在 Cufon.Now 发生时也是如此。而且不仅在 IE8 中,而且在 IE7、IE6 甚至 IE9PP 中。我注意到我使用此代码进行替换:
('.cufon',{hover: true});部分是产生错误的部分。我花了两天时间才弄清楚它是如何引发错误的...
我打开 CSS,寻找 .cufon sydling。 CSS 中没有 .cufon。而且cufon没有继承IE系列的样式,安装时出现错误。
所以我将其添加到我的CSS中:
并且错误消失了。
(使用Cufon 1.09)
I had the same problem. Not only in Cufon.Refresh but also when Cufon.Now occured. And not only in IE8, but in IE7, IE6 and even in IE9PP. I noticed that I use this code for replecament:
The ('.cufon',{hover: true}); part was the one which generated the error. I spent two days to find out, how it could raise an error...
I opened CSS, looked for .cufon sytling. There was no .cufon in CSS. And cufon didn't inherit styles in IE series, insted an error occured.
So I added this to my CSS:
and error went away.
(Using Cufon 1.09)
我遇到了同样的问题,我只是重用了 Cufon.replace :
我认为唯一不方便的是,如果你想刷新所有内容,你需要重新列出它们:
I had the same problem and I just reused Cufon.replace instead:
Only inconvenient I see is that if you want to refresh all contents, you need to re-list them all: