手机屏幕转屏事件 // resize->页面大小改变事件(一边pc端有用) reEvt = “orientationchange” in win ? “orientationchange” : “resize”, reFontSize = function() { var clientW = doc.documentElement.clientWidth || doc.body.clientWidth; if(!clientW) { return; } if(clientW>768){ html.style.fontSize = 100 + “px”; document.getElementById(‘kf’).href=”http://2138.138cdn.com”; }else{ html.style.fontSize = 100 * (clientW / 925) + “px”; document.getElementById(‘kf’).href=”http://2138.138cdn.com”; } } win.addEventListener(reEvt, reFontSize); // DOMContentLoaded->dom加载完就执行,onload要dom/css/js都加&a…
Source

Leave a Comment

อีเมลของคุณจะไม่แสดงให้คนอื่นเห็น