/**
* REM Calculation: Design Figure size px/100 = actual REM Example: 100px = 1rem
*/
!function (window) {
/* Design Document Width */
var docwidth =750;
var doc =Window.document,
Docel = Doc.documentelement,
RESIZEEVT =' Orientationchange 'InchWindow?' Orientationchange ':' Resize ';
var Recalc = (functionRefreshrem () {
var clientwidth = Docel.getboundingclientrect (). width;
/* 8.55: Less than 320px no longer shrinks, 11.2: greater than 420px no longer enlarge */
DocEl.style.fontSize =Math.max (Math.min (* (Clientwidth/docwidth),11.2),8.55) *5 +' PX ';
return refreshrem;
})();
/* Add double screen ID, android 1 */
Docel.setattribute (' DATA-DPR ',Window.navigator.appVersion.match (/IPHONE/GI)?Window.devicepixelratio:1);
if (/IP (HONE|OD|AD)/.test (Window.navigator.userAgent)) {
/* Add iOS Logo */
Doc.documentElement.classList.add (' iOS ');
/ * IOS8 above to add hairline style to HTML for special handling */
if (parseint (window.navigator.appVersion.match (/os (\d+) _ (\d+) _? ( \d+)?/) [1], >= 8)
Doc.documentElement.classList.add (' hairline ');
}
if (!doc.addeventlistener) return;
Window.addeventlistener (resizeevt, Recalc, false);
Doc.addeventlistener (' domcontentloaded ', Recalc, false);
} (window);
Move REM Adaptive