(function(doc, win) {
var docEl = doc.documentElement,
resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
recalc = function() {
var clientWidth = docEl.clientWidth;
if(!clientWidth) return;
docEl.style.fontSize = (clientWidth >= 720 ? 100 : clientWidth / 7.5) + 'px';
};
if(!doc.addEventListener) return;
win.addEventListener(resizeEvt, recalc, false);
doc.addEventListener('DOMContentLoaded', recalc, false);
})(document, window);
Consider placing this js before the body tag
There is a compromise solution. First, set the display of the body: none;
Then use js to control the timing. After 1 millisecond, the display of the body is block;
setTimeout(showpage,1);
The disadvantage is that when loading, there will be a white screen for one millisecond without jitter. 1 millisecond is considered very short. If you don’t mind, you can try it.