• 移动端还原设计图


    (function (doc, win) {
                var html = doc.getElementsByTagName("html")[0],
                    // orientationchange->手机屏幕转屏事件
                    // resize->页面大小改变事件(兼容pc,移动端)
                    reEvt = "orientationchange" in win ? "orientationchange" : "resize",
                    designWidth=1920,
                    setFontSize = function () {
                        var clientW = doc.documentElement.clientWidth || doc.body.clientWidth;
                        if (!clientW) {
                            return;
                        }
                        html.style.fontSize = 100 * (clientW / 1920) + "px";
                    }
                var resetFontSize=function(){
                    if(win.resetFontTimeout){
                        clearTimeout(win.resetFontTimeout);
                    }
                    //防抖
                    win.resetFontTimeout=setTimeout(function(){
                        setFontSize();
                    },500);
                }
                win.addEventListener(reEvt, resetFontSize);
                // DOMContentLoaded->dom加载完就执行,onload要dom/css/js都加载完才执行
                doc.addEventListener("onload", setFontSize);
            })(document, window);

  • 相关阅读:
    批量管理增量日志(seek、tell)
    字符串和编码
    5.activiti--完成任务
    4.activiti--代理任务Claiming the task
    3.activiti--待办任务
    2.activiti-启动流程实例
    1.activiti-流程图
    html 各种高度
    redis-过期时间、访问限制与缓存
    spring mvc controller 接收参数
  • 原文地址:https://www.cnblogs.com/coder-axin/p/9767824.html
Copyright © 2020-2023  润新知