最初に私の英語で申し訳ありません。私は何か見落としてますか?次のコードを使用して、コンテンツのレンダリングをブロックしないようにします。
WebFontConfig = {
google: {
families: ['Lato:300,300i,700']
},
active: function () {
//document.querySelector('body').fadeIn(1000);
},
};
(function () {
var wf = document.createElement('script');
wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
'://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js';
wf.type = 'text/javascript';
wf.async = 'true';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(wf, s);
})();
スピードテストが成功しないと、フォントのレンダリングがブロックされていると不平を言う (async = true)... . このレンダーブロッキングを防ぐ別の方法があるのだろうか....