IE9显示后未将@ font-face字体应用于模式 [英] IE9 isn't applying @font-face fonts for a modal after it's shown
问题描述
所以,我上面有一个带有SimpleModal的页面,并且通过Typekit(使用一些棘手的JS设置一些@font-face
规则)应用了字体,并且一切都变得很花哨.
So, I've got a page w/ a SimpleModal on it, and fonts are applied via Typekit (which uses some tricky JS to set up some @font-face
rules) and everything is just dandy.
模态本身除外;当您单击以将其打开时,不会应用@font-face
字体,因此看起来有些混乱.但是,如果您将其关闭&重新打开它,或者使用开发人员工具,字体突然被神奇地应用了.
Except for the modal itself; when you click to open it, the @font-face
fonts aren't applied, so things look janky. If, however, you close it & re-open it, or you use the Developer Tools, the font is suddenly magically applied.
有人看到了吗?
推荐答案
因此Eric提供了答案(考虑到他是SimpleModal的开发者,这很有意义.)
So Eric provided the answer (considering he's the developer of SimpleModal, that makes sense.)
无论如何,只需将clone: true
添加到模态调用中,如下所示:
Anyway, just need to add clone: true
to the call for the modal, like so:
$(element).modal({clone:true})
然后IE9立即渲染@font-face
内容!很棒.
And then IE9 renders @font-face
stuff right away! Brilliant.
这篇关于IE9显示后未将@ font-face字体应用于模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!