IE9 isn't applying @font-face fonts for a modal after it's shown

偶尔善良 提交于 2019-12-12 05:59:45

问题


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.

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.

Anybody seen this?


回答1:


So Eric provided the answer (considering he's the developer of SimpleModal, that makes sense.)

Anyway, just need to add clone: true to the call for the modal, like so:

$(element).modal({clone:true})

And then IE9 renders @font-face stuff right away! Brilliant.



来源:https://stackoverflow.com/questions/5507078/ie9-isnt-applying-font-face-fonts-for-a-modal-after-its-shown

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