webstrom中模块文件,针对移动端计算是750之类的方式

针对移动端计算是750之类的方式,如下

function rootREM(num) {
            var W = document.documentElement.clientWidth;
            W = (W <= num) ? W : num;
            document.documentElement.style.fontSize = W / 10 + 'px';
            document.body.style.fontSize = W / 20 + 'px';
        }
        window.onresize = function () {
            rootREM(750)//如果这边输入750那么,计算的时候就是按750方式
        };//注意:此代码大神可以略过

  或者使用下面的链接(cdn)方式将代码放到*.html中,去访问,就行了,它会自动帮我们计算的

<script src="http://g.tbcdn.cn/mtb/lib-flexible/0.3.4/??flexible_css.js,flexible.js"></script>

免费提供webstrom(我配置文件)

下载地址如下

<a href="https://files.cnblogs.com/files/mhxy13867806343/webstrom2018-3%E6%9C%80%E6%96%B0%E7%89%88%EF%BC%8C%E8%AE%BE%E7%BD%AE%E4%BA%86typescript.js%E8%87%AA%E5%8A%A8%E7%BC%96%E8%AF%91%E6%88%90es5%E4%BB%A3%E7%A0%81.zip">webstrom2018-3最新版,设置了typescript.js自动编译成es5代码</a>

欢迎大家使用,谢谢哦

猜你喜欢

转载自www.cnblogs.com/mhxy13867806343/p/9939014.html