cufon样式可以形成文本输入和textarea吗?
可以这样做吗?我在文档中找不到任何内容表明您不能这样做,但以下选择器对我不起作用:
Cufon.set('fontFamily', 'Museo');
Cufon.set('fontWeight', '300');
Cufon.replace('input.text, input.password, textarea');
有任何想法,还是 Cufon 根本不支持此操作?
谢谢。
Is it possible to do this? I haven't been able to find anything in the documenation that says you CAN'T do it, but the following selector is not working for me:
Cufon.set('fontFamily', 'Museo');
Cufon.set('fontWeight', '300');
Cufon.replace('input.text, input.password, textarea');
Any ideas, or does Cufon simply not support this?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我强烈建议不要这么做。您最终会在站点中引入大量可用性问题(即没有复制/粘贴和退格问题)。 Cufon 在这个世界上占有一席之地,但不是在动态用户编辑的文本上。
您还会在您的网站中引入大量“跳转”行为,因为 Cufon 的 JavaScript 会在浏览器中阻塞,直到替换掉所有必需的文本。这会破坏您网站中的内容流。
I would strongly advise against it. You would end up introducing tons of usability issues in your site (i.e. no copy/paste and backspace issues). Cufon has it's place in this world, but not on dynamically user edited text.
You would also introduce alot of "jump" behavior into your site since Cufon's JavaScript blocks in the browser until it has all of the required text replaced. This would break the flow of content up in your site.