问题
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