jQuery Explode 在爆炸时改变字体,我该如何阻止这个?

发布于 2024-09-27 04:58:37 字数 324 浏览 7 评论 0原文

转至 http://hartford.uconn.edu/scholarships/ 单击任何名称,然后单击“关闭”按钮将显示在“爆炸”时字体从默认的“Trebuchet MS/Trebuchet”更改为“Times New Roman”。我尝试定义 body {font-family:"Trebuchet MS", Trebuchet;} 并定义其他类并更改 jQuery 小部件类来定义所需的字体系列,但似乎没有任何效果。请查看来源,如有任何建议,我们将不胜感激。

谢谢你!

Go to http://hartford.uconn.edu/scholarships/ click on any name, then click on "close" button which will show you that while "exploding" the fonts change from default "Trebuchet MS/ Trebuchet" to "Times New Roman". I have tried defining body {font-family:"Trebuchet MS", Trebuchet;} and defining other classes and change jQuery widget classes as well to define desired font family but nothing seems to work. Please take a look at source and any suggestions are appreciated.

Thank you!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

牵你手 2024-10-04 04:58:37

在幕后,“爆炸”效果实际上是创建动画中任何内容的多个克隆并将效果应用于这些克隆。这些克隆附加到根 元素的末尾。看起来您的 CSS 在 #center_wrapper div 上定义了 font-family,这不适用于克隆,因此它们显示为默认的无样式文本。

相反,在 body 上定义字体对我有用。也许您的浏览器正在缓存旧的 CSS?

Under the hood, the "explode" effect is actually creating several clones of whatever is being animated and applying the effects to those. These clones are attached to the end of the root <body> element. It looks like your CSS has the font-family defined on the #center_wrapper div, which doesn't apply to the clones, so they're shown as default unstyled text.

Defining the font on body instead worked for me. Perhaps your browser was caching the old CSS?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文